diff options
author | Miklos Szeredi <mszeredi@suse.cz> | 2011-02-24 17:49:53 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-24 19:55:01 +0300 |
commit | 8074b26f67165bf045d92e778c9c10dc5e207fc6 (patch) | |
tree | 7f4870224b54121fbfea83cd77ea41f7ab3a00d8 /fs | |
parent | 3c522cedb572bb8d2e4867f358bdaa7d0c53d88c (diff) | |
download | linux-8074b26f67165bf045d92e778c9c10dc5e207fc6.tar.xz |
mm: fix refcounting in swapon
Grab a reference to bdev before calling blkdev_get(), which expects
the refcount to be already incremented and either returns success or
decrements the refcount and returns an error.
The bug was introduced by e525fd89 (block: make blkdev_get/put()
handle exclusive access), which didn't take into account this behavior
of blkdev_get().
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions