aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/ceph/file.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 2c4ae4441cab..88932c9145e9 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -807,7 +807,7 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
807 struct ceph_osd_client *osdc = &ceph_client(inode->i_sb)->osdc; 807 struct ceph_osd_client *osdc = &ceph_client(inode->i_sb)->osdc;
808 loff_t endoff = pos + iov->iov_len; 808 loff_t endoff = pos + iov->iov_len;
809 int got = 0; 809 int got = 0;
810 int ret; 810 int ret, err;
811 811
812 if (ceph_snap(inode) != CEPH_NOSNAP) 812 if (ceph_snap(inode) != CEPH_NOSNAP)
813 return -EROFS; 813 return -EROFS;
@@ -838,9 +838,12 @@ retry_snap:
838 838
839 if ((ret >= 0 || ret == -EIOCBQUEUED) && 839 if ((ret >= 0 || ret == -EIOCBQUEUED) &&
840 ((file->f_flags & O_SYNC) || IS_SYNC(file->f_mapping->host) 840 ((file->f_flags & O_SYNC) || IS_SYNC(file->f_mapping->host)
841 || ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_NEARFULL))) 841 || ceph_osdmap_flag(osdc->osdmap, CEPH_OSDMAP_NEARFULL))) {
842 ret = vfs_fsync_range(file, file->f_path.dentry, 842 err = vfs_fsync_range(file, file->f_path.dentry,
843 pos, pos + ret - 1, 1); 843 pos, pos + ret - 1, 1);
844 if (err < 0)
845 ret = err;
846 }
844 } 847 }
845 if (ret >= 0) { 848 if (ret >= 0) {
846 spin_lock(&inode->i_lock); 849 spin_lock(&inode->i_lock);