lkml.org 
[lkml]   [2005]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/29] let fat handle MS_SYNCHRONOUS flag
From
Date
Christoph Hellwig <hch@infradead.org> writes:

>> mark_buffer_dirty(bh);
>> + if (sb->s_flags & MS_SYNCHRONOUS)
>> + sync_dirty_buffer(bh);
>
> These three lines are duplicated a lot. I think you want a helper ala:
>
> static inline void fat_buffer_modified(struct super_block *sb,
> struct buffer_head *bh)
> {
> mark_buffer_dirty(bh);
> if (sb->s_flags & MS_SYNCHRONOUS)
> sync_dirty_buffer(bh);
> }

Yes, I may want the following helper. However I'll put it as is for now.

static inline void fat_buffer_modified(struct super_block *sb,
struct buffer_head *bh, int wait)
{
int err = 0;
mark_buffer_dirty(bh);
if (wait)
err = sync_dirty_buffer(bh);
return err;
}
--
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.264 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site