aboutsummaryrefslogtreecommitdiffstats
path: root/fs/adfs/dir_fplus.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-06-08 00:44:42 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-06-11 21:36:13 -0400
commitffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad (patch)
treea7cc3f3940211682289983865e453b4d7083554b /fs/adfs/dir_fplus.c
parentbea6b64c277f0824cdaea6190209b26a164419d6 (diff)
repair adfs ->write_inode(), switch to simple_fsync()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/adfs/dir_fplus.c')
-rw-r--r--fs/adfs/dir_fplus.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/adfs/dir_fplus.c b/fs/adfs/dir_fplus.c
index 1ec644e32df9..139e0f345f18 100644
--- a/fs/adfs/dir_fplus.c
+++ b/fs/adfs/dir_fplus.c
@@ -161,6 +161,22 @@ out:
161 return ret; 161 return ret;
162} 162}
163 163
164static int
165adfs_fplus_sync(struct adfs_dir *dir)
166{
167 int err = 0;
168 int i;
169
170 for (i = dir->nr_buffers - 1; i >= 0; i--) {
171 struct buffer_head *bh = dir->bh[i];
172 sync_dirty_buffer(bh);
173 if (buffer_req(bh) && !buffer_uptodate(bh))
174 err = -EIO;
175 }
176
177 return err;
178}
179
164static void 180static void
165adfs_fplus_free(struct adfs_dir *dir) 181adfs_fplus_free(struct adfs_dir *dir)
166{ 182{
@@ -175,5 +191,6 @@ struct adfs_dir_ops adfs_fplus_dir_ops = {
175 .read = adfs_fplus_read, 191 .read = adfs_fplus_read,
176 .setpos = adfs_fplus_setpos, 192 .setpos = adfs_fplus_setpos,
177 .getnext = adfs_fplus_getnext, 193 .getnext = adfs_fplus_getnext,
194 .sync = adfs_fplus_sync,
178 .free = adfs_fplus_free 195 .free = adfs_fplus_free
179}; 196};