diff options
author | Christoph Hellwig <hch@lst.de> | 2009-09-30 16:17:16 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-12-10 09:02:51 -0500 |
commit | 5ced58f73554e9d9609a790c5164d10ef91ce8ff (patch) | |
tree | adb14893b7b7e65fcd239ca4b0b5650e25b93687 /fs | |
parent | 027cf316afff03d310281709314fbc0899984759 (diff) |
ubifs: remove manual O_SYNC handling
generic_file_aio_write already calls into ->fsync to handle O_SYNC/O_DSYNC.
Remove the duplicate call to ubifs_sync_wbufs_by_inode which is already
covered by ubifs_fsync.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ubifs/file.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index eaa3d480bc2..39849f887e7 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c | |||
@@ -1389,7 +1389,6 @@ static ssize_t ubifs_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
1389 | unsigned long nr_segs, loff_t pos) | 1389 | unsigned long nr_segs, loff_t pos) |
1390 | { | 1390 | { |
1391 | int err; | 1391 | int err; |
1392 | ssize_t ret; | ||
1393 | struct inode *inode = iocb->ki_filp->f_mapping->host; | 1392 | struct inode *inode = iocb->ki_filp->f_mapping->host; |
1394 | struct ubifs_info *c = inode->i_sb->s_fs_info; | 1393 | struct ubifs_info *c = inode->i_sb->s_fs_info; |
1395 | 1394 | ||
@@ -1397,17 +1396,7 @@ static ssize_t ubifs_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
1397 | if (err) | 1396 | if (err) |
1398 | return err; | 1397 | return err; |
1399 | 1398 | ||
1400 | ret = generic_file_aio_write(iocb, iov, nr_segs, pos); | 1399 | return generic_file_aio_write(iocb, iov, nr_segs, pos); |
1401 | if (ret < 0) | ||
1402 | return ret; | ||
1403 | |||
1404 | if (ret > 0 && (IS_SYNC(inode) || iocb->ki_filp->f_flags & O_DSYNC)) { | ||
1405 | err = ubifs_sync_wbufs_by_inode(c, inode); | ||
1406 | if (err) | ||
1407 | return err; | ||
1408 | } | ||
1409 | |||
1410 | return ret; | ||
1411 | } | 1400 | } |
1412 | 1401 | ||
1413 | static int ubifs_set_page_dirty(struct page *page) | 1402 | static int ubifs_set_page_dirty(struct page *page) |