vfs: separate __sb_start_write into blocking and non-blocking helpers
Break this function into two helpers so that it's obvious that the trylock versions return a value that must be checked, and the blocking versions don't require that. While we're at it, clean up the return type mismatch. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
@@ -3532,8 +3532,7 @@ static int io_write(struct io_kiocb *req, bool force_nonblock,
|
||||
* we return to userspace.
|
||||
*/
|
||||
if (req->flags & REQ_F_ISREG) {
|
||||
__sb_start_write(file_inode(req->file)->i_sb,
|
||||
SB_FREEZE_WRITE, true);
|
||||
sb_start_write(file_inode(req->file)->i_sb);
|
||||
__sb_writers_release(file_inode(req->file)->i_sb,
|
||||
SB_FREEZE_WRITE);
|
||||
}
|
||||
|
Reference in New Issue
Block a user