]> err.no Git - linux-2.6/commit
vfs: fix unconditional write_super() call in file_fsync()
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Tue, 29 Apr 2008 07:59:42 +0000 (00:59 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:06 +0000 (08:06 -0700)
commit762873c251b056c6c1b29e83a4dabafb064e5421
tree0b1f4f7c2e7ea46cf536fbdf227cb7734bc78b07
parent8f0cfa52a1d4ffacd8e7de906d19662f5da58d58
vfs: fix unconditional write_super() call in file_fsync()

We need to check ->s_dirt before calling write_super().  It became the cause
of an unneeded write.

This bug was noticed by Sudhanshu Saxena.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/sync.c