diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-08 00:44:42 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-06-11 21:36:13 -0400 |
commit | ffdc9064f8b4fa9db37a7d5180f41cce2ea2b7ad (patch) | |
tree | a7cc3f3940211682289983865e453b4d7083554b /fs/adfs/dir_f.c | |
parent | bea6b64c277f0824cdaea6190209b26a164419d6 (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_f.c')
-rw-r--r-- | fs/adfs/dir_f.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/adfs/dir_f.c b/fs/adfs/dir_f.c index ea7df2146921..31df6adf0de6 100644 --- a/fs/adfs/dir_f.c +++ b/fs/adfs/dir_f.c | |||
@@ -437,6 +437,22 @@ bad_dir: | |||
437 | #endif | 437 | #endif |
438 | } | 438 | } |
439 | 439 | ||
440 | static int | ||
441 | adfs_f_sync(struct adfs_dir *dir) | ||
442 | { | ||
443 | int err = 0; | ||
444 | int i; | ||
445 | |||
446 | for (i = dir->nr_buffers - 1; i >= 0; i--) { | ||
447 | struct buffer_head *bh = dir->bh[i]; | ||
448 | sync_dirty_buffer(bh); | ||
449 | if (buffer_req(bh) && !buffer_uptodate(bh)) | ||
450 | err = -EIO; | ||
451 | } | ||
452 | |||
453 | return err; | ||
454 | } | ||
455 | |||
440 | static void | 456 | static void |
441 | adfs_f_free(struct adfs_dir *dir) | 457 | adfs_f_free(struct adfs_dir *dir) |
442 | { | 458 | { |
@@ -456,5 +472,6 @@ struct adfs_dir_ops adfs_f_dir_ops = { | |||
456 | .setpos = adfs_f_setpos, | 472 | .setpos = adfs_f_setpos, |
457 | .getnext = adfs_f_getnext, | 473 | .getnext = adfs_f_getnext, |
458 | .update = adfs_f_update, | 474 | .update = adfs_f_update, |
475 | .sync = adfs_f_sync, | ||
459 | .free = adfs_f_free | 476 | .free = adfs_f_free |
460 | }; | 477 | }; |