generic__inode() seems to do over-writing, if OSYNC_INODE only passed. According comments of generic_osync_inode(), it is expected to write inode itself only. Current implementation trys to write data page, even if OSYNC_INODE only passed. This patch fixes it. This patch is preparetion of other patch to fix "miss-sync changes on attributes". Machida, Hiroyuki wrote: > > > OGAWA Hirofumi wrote: > >> "Machida, Hiroyuki" writes: >> >> >>> OGAWA Hirofumi wrote: >>> >>>> Andrew Morton writes: >>>> >>>> >>>>> However there's not much point in writing a brand-new function when >>>>> write_inode_now() almost does the right thing. We can share the >>>>> implementation within fs-writeback.c. >>>> >>>> >>>> Indeed. We use the generic_osync_inode() for it? >>> >>> >>> Please let me confirm. >>> Using generic_osync_inode(inode, NULL, OSYNC_INODE) instaed of >>> sync_inode_wodata(inode) is peferable for changes on fs/open.c, >>> even it would write data. Is it correct? >> >> >> >> No, I only thought the interface is good. I don't know why it writes >> data pages even if OSYNC_INODE only. > > > > I checked 2.6.13 tree, following functions call generic_osync_inode(). > However noone calls it with OSYNC_INODE. SO I can't find intention of > it's usage. > > Does anyone know why generic_osync_inode() trys to write data page, > even if OSYNC_INODE only passed ? > > - fs/reiserfs/file.c > reiserfs_file_write() OSYNC_METADATA | OSYNC_DATA > - mm/filemap.c > sync_page_range() OSYNC_METADATA > sync_page_range_nolock() OSYNC_METADATA > generic_file_direct_write OSYNC_METADATA > -- Hiroyuki Machida machida@sm.sony.co.jp