ceph_aio_write(): switch to generic_perform_write()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
0a64bc2c04
commit
aec605f429
1 changed files with 5 additions and 2 deletions
|
@ -970,6 +970,7 @@ retry_snap:
|
||||||
goto retry_snap;
|
goto retry_snap;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
struct iov_iter from;
|
||||||
/*
|
/*
|
||||||
* No need to acquire the i_truncate_mutex. Because
|
* No need to acquire the i_truncate_mutex. Because
|
||||||
* the MDS revokes Fwb caps before sending truncate
|
* the MDS revokes Fwb caps before sending truncate
|
||||||
|
@ -977,8 +978,10 @@ retry_snap:
|
||||||
* are pending vmtruncate. So write and vmtruncate
|
* are pending vmtruncate. So write and vmtruncate
|
||||||
* can not run at the same time
|
* can not run at the same time
|
||||||
*/
|
*/
|
||||||
written = generic_file_buffered_write(iocb, iov, nr_segs,
|
iov_iter_init(&from, iov, nr_segs, count, 0);
|
||||||
pos, count, 0);
|
written = generic_perform_write(file, &from, pos);
|
||||||
|
if (likely(written >= 0))
|
||||||
|
iocb->ki_pos = pos + written;
|
||||||
mutex_unlock(&inode->i_mutex);
|
mutex_unlock(&inode->i_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue