diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-10 11:16:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-10-10 11:16:44 -0400 |
commit | 015c21ba59fcbc522d7a9d1e0ab0f0e6c0895ff0 (patch) | |
tree | 4fa0e91287d927e9df8e1658f93c40ca9efd60bc /fs/super.c | |
parent | 5e48e55fb57a9026e6b3b6961def6d2aeb210659 (diff) | |
parent | 6fcf0c72e4b9360768cf5ef543c4f14c34800ee8 (diff) |
Merge branch 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull mount fixes from Al Viro:
"A couple of regressions from the mount series"
* 'work.mount3' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
vfs: add missing blkdev_put() in get_tree_bdev()
shmem: fix LSM options parsing
Diffstat (limited to 'fs/super.c')
-rw-r--r-- | fs/super.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/super.c b/fs/super.c index f627b7c53d2b..cfadab2cbf35 100644 --- a/fs/super.c +++ b/fs/super.c | |||
@@ -1300,6 +1300,7 @@ int get_tree_bdev(struct fs_context *fc, | |||
1300 | mutex_lock(&bdev->bd_fsfreeze_mutex); | 1300 | mutex_lock(&bdev->bd_fsfreeze_mutex); |
1301 | if (bdev->bd_fsfreeze_count > 0) { | 1301 | if (bdev->bd_fsfreeze_count > 0) { |
1302 | mutex_unlock(&bdev->bd_fsfreeze_mutex); | 1302 | mutex_unlock(&bdev->bd_fsfreeze_mutex); |
1303 | blkdev_put(bdev, mode); | ||
1303 | warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev); | 1304 | warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev); |
1304 | return -EBUSY; | 1305 | return -EBUSY; |
1305 | } | 1306 | } |
@@ -1308,8 +1309,10 @@ int get_tree_bdev(struct fs_context *fc, | |||
1308 | fc->sget_key = bdev; | 1309 | fc->sget_key = bdev; |
1309 | s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc); | 1310 | s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc); |
1310 | mutex_unlock(&bdev->bd_fsfreeze_mutex); | 1311 | mutex_unlock(&bdev->bd_fsfreeze_mutex); |
1311 | if (IS_ERR(s)) | 1312 | if (IS_ERR(s)) { |
1313 | blkdev_put(bdev, mode); | ||
1312 | return PTR_ERR(s); | 1314 | return PTR_ERR(s); |
1315 | } | ||
1313 | 1316 | ||
1314 | if (s->s_root) { | 1317 | if (s->s_root) { |
1315 | /* Don't summarily change the RO/RW state. */ | 1318 | /* Don't summarily change the RO/RW state. */ |