summaryrefslogtreecommitdiffstats
path: root/fs/adfs/dir.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 06:44:42 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-12 03:36:13 +0200
commitffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad (patch)
treea7cc3f3940211682289983865e453b4d7083554b /fs/adfs/dir.c
parentswitch omfs to simple_fsync() (diff)
downloadlinux-ffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad.tar.xz
linux-ffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad.zip
repair adfs ->write_inode(), switch to simple_fsync()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/dir.c')
-rw-r--r--fs/adfs/dir.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/fs/adfs/dir.c b/fs/adfs/dir.c
index e867ccf37246..4d4073447d1a 100644
--- a/fs/adfs/dir.c
+++ b/fs/adfs/dir.c
@@ -83,7 +83,7 @@ out:
}
int
-adfs_dir_update(struct super_block *sb, struct object_info *obj)
+adfs_dir_update(struct super_block *sb, struct object_info *obj, int wait)
{
int ret = -EINVAL;
#ifdef CONFIG_ADFS_FS_RW
@@ -106,6 +106,12 @@ adfs_dir_update(struct super_block *sb, struct object_info *obj)
ret = ops->update(&dir, obj);
write_unlock(&adfs_dir_lock);
+ if (wait) {
+ int err = ops->sync(&dir);
+ if (!ret)
+ ret = err;
+ }
+
ops->free(&dir);
out:
#endif
@@ -199,7 +205,7 @@ const struct file_operations adfs_dir_operations = {
.read = generic_read_dir,
.llseek = generic_file_llseek,
.readdir = adfs_readdir,
- .fsync = file_fsync,
+ .fsync = simple_fsync,
};
static int