diff options
-rw-r--r-- | fs/ext2/dir.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 9a0fc400f91c..2999d72153b7 100644 --- a/fs/ext2/dir.c +++ b/fs/ext2/dir.c | |||
@@ -95,10 +95,13 @@ static int ext2_commit_chunk(struct page *page, loff_t pos, unsigned len) | |||
95 | mark_inode_dirty(dir); | 95 | mark_inode_dirty(dir); |
96 | } | 96 | } |
97 | 97 | ||
98 | if (IS_DIRSYNC(dir)) | 98 | if (IS_DIRSYNC(dir)) { |
99 | err = write_one_page(page, 1); | 99 | err = write_one_page(page, 1); |
100 | else | 100 | if (!err) |
101 | err = ext2_sync_inode(dir); | ||
102 | } else { | ||
101 | unlock_page(page); | 103 | unlock_page(page); |
104 | } | ||
102 | 105 | ||
103 | return err; | 106 | return err; |
104 | } | 107 | } |