Messages in this thread | | | Subject | Re: [PATCH 4/29] let fat handle MS_SYNCHRONOUS flag | From | OGAWA Hirofumi <> | Date | Mon, 07 Mar 2005 23:56:31 +0900 |
| |
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/
| |