From: Hugh Dickins Date: Sat, 25 Jun 2005 21:55:41 +0000 (-0700) Subject: [PATCH] fix fsync(dir) return value for ram-based filesystems X-Git-Tag: v2.6.13-rc1~68^2~163 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=8ae0b77811d97552b3b3c745e97de18849583bf7;p=linux-2.6-omap-h63xx.git [PATCH] fix fsync(dir) return value for ram-based filesystems Any filesystem which is using simple_dir_operations will retunr -EINVAL for fsync() on a directory. Make it return zero instead. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/libfs.c b/fs/libfs.c index 5025563e737..58101dff2c6 100644 --- a/fs/libfs.c +++ b/fs/libfs.c @@ -183,6 +183,7 @@ struct file_operations simple_dir_operations = { .llseek = dcache_dir_lseek, .read = generic_read_dir, .readdir = dcache_readdir, + .fsync = simple_sync_file, }; struct inode_operations simple_dir_inode_operations = {