diff options
Diffstat (limited to 'fs/ubifs/file.c')
-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 1009adc8d602..39849f887e72 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_SYNC)) { | ||
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) |