diff options
Diffstat (limited to 'fs/adfs/dir.c')
-rw-r--r-- | fs/adfs/dir.c | 10 |
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: | |||
83 | } | 83 | } |
84 | 84 | ||
85 | int | 85 | int |
86 | adfs_dir_update(struct super_block *sb, struct object_info *obj) | 86 | adfs_dir_update(struct super_block *sb, struct object_info *obj, int wait) |
87 | { | 87 | { |
88 | int ret = -EINVAL; | 88 | int ret = -EINVAL; |
89 | #ifdef CONFIG_ADFS_FS_RW | 89 | #ifdef CONFIG_ADFS_FS_RW |
@@ -106,6 +106,12 @@ adfs_dir_update(struct super_block *sb, struct object_info *obj) | |||
106 | ret = ops->update(&dir, obj); | 106 | ret = ops->update(&dir, obj); |
107 | write_unlock(&adfs_dir_lock); | 107 | write_unlock(&adfs_dir_lock); |
108 | 108 | ||
109 | if (wait) { | ||
110 | int err = ops->sync(&dir); | ||
111 | if (!ret) | ||
112 | ret = err; | ||
113 | } | ||
114 | |||
109 | ops->free(&dir); | 115 | ops->free(&dir); |
110 | out: | 116 | out: |
111 | #endif | 117 | #endif |
@@ -199,7 +205,7 @@ const struct file_operations adfs_dir_operations = { | |||
199 | .read = generic_read_dir, | 205 | .read = generic_read_dir, |
200 | .llseek = generic_file_llseek, | 206 | .llseek = generic_file_llseek, |
201 | .readdir = adfs_readdir, | 207 | .readdir = adfs_readdir, |
202 | .fsync = file_fsync, | 208 | .fsync = simple_fsync, |
203 | }; | 209 | }; |
204 | 210 | ||
205 | static int | 211 | static int |