sys_swapon: separate bdev claim and inode lock
authorCesar Eduardo Barros <cesarb@cesarb.net>
Tue, 22 Mar 2011 23:33:26 +0000 (16:33 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 23 Mar 2011 00:44:07 +0000 (17:44 -0700)
commit4d0e1e10752ca487d83d1ab2a1d4ae6d664e1cc0
tree57f0c09fd4e61a02e4ad5cd86b1dbda7029b2806
parentbd69010b042a60ca41a890df1b10019e94746c2f
sys_swapon: separate bdev claim and inode lock

Move the code which claims the bdev (S_ISBLK) or locks the inode
(S_ISREG) to a separate function. Only code movement, no functional
changes.

Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Tested-by: Eric B Munson <emunson@mgebm.net>
Acked-by: Eric B Munson <emunson@mgebm.net>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/swapfile.c