mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
logfs: fix a leak in get_sb
a) switch ->put_device() to logfs_super * b) actually call it on early failures in logfs_get_sb_device() Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
7d945a3aa7
commit
e5a0726a95
4 changed files with 8 additions and 7 deletions
|
@ -298,9 +298,9 @@ static int bdev_write_sb(struct super_block *sb, struct page *page)
|
|||
return sync_request(page, bdev, WRITE);
|
||||
}
|
||||
|
||||
static void bdev_put_device(struct super_block *sb)
|
||||
static void bdev_put_device(struct logfs_super *s)
|
||||
{
|
||||
close_bdev_exclusive(logfs_super(sb)->s_bdev, FMODE_READ|FMODE_WRITE);
|
||||
close_bdev_exclusive(s->s_bdev, FMODE_READ|FMODE_WRITE);
|
||||
}
|
||||
|
||||
static int bdev_can_write_buf(struct super_block *sb, u64 ofs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue