From: Miklos Szeredi Date: Tue, 14 Apr 2009 17:48:41 +0000 (+0200) Subject: splice: add helpers for locking pipe inode X-Git-Tag: v2.6.30-rc3~88^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61e0d47c33cc371f725bcda4a47ae0efe652dba8;p=pandora-kernel.git splice: add helpers for locking pipe inode 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 Signed-off-by: Jens Axboe --- Reading git-diff-tree failed