Skip to content

Commit 015c21b

Browse files
committed
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
2 parents 5e48e55 + 6fcf0c7 commit 015c21b

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

fs/super.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1300,6 +1300,7 @@ int get_tree_bdev(struct fs_context *fc,
13001300
mutex_lock(&bdev->bd_fsfreeze_mutex);
13011301
if (bdev->bd_fsfreeze_count > 0) {
13021302
mutex_unlock(&bdev->bd_fsfreeze_mutex);
1303+
blkdev_put(bdev, mode);
13031304
warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev);
13041305
return -EBUSY;
13051306
}
@@ -1308,8 +1309,10 @@ int get_tree_bdev(struct fs_context *fc,
13081309
fc->sget_key = bdev;
13091310
s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc);
13101311
mutex_unlock(&bdev->bd_fsfreeze_mutex);
1311-
if (IS_ERR(s))
1312+
if (IS_ERR(s)) {
1313+
blkdev_put(bdev, mode);
13121314
return PTR_ERR(s);
1315+
}
13131316

13141317
if (s->s_root) {
13151318
/* Don't summarily change the RO/RW state. */

mm/shmem.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data)
34823482
{
34833483
char *options = data;
34843484

3485+
if (options) {
3486+
int err = security_sb_eat_lsm_opts(options, &fc->security);
3487+
if (err)
3488+
return err;
3489+
}
3490+
34853491
while (options != NULL) {
34863492
char *this_char = options;
34873493
for (;;) {

0 commit comments

Comments
 (0)