+0
−36
+38
−4
+21
−29
+0
−3
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
There are lots of sequences like this, especially in splice code: if (pipe->inode) mutex_lock(&pipe->inode->i_mutex); /* do something */ if (pipe->inode) mutex_unlock(&pipe->inode->i_mutex); so introduce helpers which do the conditional locking and unlocking. Also replace the inode_double_lock() call with a pipe_double_lock() helper to avoid spreading the use of this functionality beyond the pipe code. This patch is just a cleanup, and should cause no behavioral changes. Signed-off-by:Miklos Szeredi <mszeredi@suse.cz> Signed-off-by:
Jens Axboe <jens.axboe@oracle.com>