Skip to content

Commit

Permalink
ceph_aio_write(): switch to generic_perform_write()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Apr 2, 2014
1 parent 0a64bc2 commit aec605f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/ceph/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,15 +970,18 @@ static ssize_t ceph_aio_write(struct kiocb *iocb, const struct iovec *iov,
goto retry_snap;
}
} else {
struct iov_iter from;
/*
* No need to acquire the i_truncate_mutex. Because
* the MDS revokes Fwb caps before sending truncate
* message to us. We can't get Fwb cap while there
* are pending vmtruncate. So write and vmtruncate
* can not run at the same time
*/
written = generic_file_buffered_write(iocb, iov, nr_segs,
pos, count, 0);
iov_iter_init(&from, iov, nr_segs, count, 0);
written = generic_perform_write(file, &from, pos);
if (likely(written >= 0))
iocb->ki_pos = pos + written;
mutex_unlock(&inode->i_mutex);
}

Expand Down

0 comments on commit aec605f

Please sign in to comment.