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
This commit is contained in:
commit
015c21ba59
@ -1300,6 +1300,7 @@ int get_tree_bdev(struct fs_context *fc,
|
|||||||
mutex_lock(&bdev->bd_fsfreeze_mutex);
|
mutex_lock(&bdev->bd_fsfreeze_mutex);
|
||||||
if (bdev->bd_fsfreeze_count > 0) {
|
if (bdev->bd_fsfreeze_count > 0) {
|
||||||
mutex_unlock(&bdev->bd_fsfreeze_mutex);
|
mutex_unlock(&bdev->bd_fsfreeze_mutex);
|
||||||
|
blkdev_put(bdev, mode);
|
||||||
warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev);
|
warnf(fc, "%pg: Can't mount, blockdev is frozen", bdev);
|
||||||
return -EBUSY;
|
return -EBUSY;
|
||||||
}
|
}
|
||||||
@ -1308,8 +1309,10 @@ int get_tree_bdev(struct fs_context *fc,
|
|||||||
fc->sget_key = bdev;
|
fc->sget_key = bdev;
|
||||||
s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc);
|
s = sget_fc(fc, test_bdev_super_fc, set_bdev_super_fc);
|
||||||
mutex_unlock(&bdev->bd_fsfreeze_mutex);
|
mutex_unlock(&bdev->bd_fsfreeze_mutex);
|
||||||
if (IS_ERR(s))
|
if (IS_ERR(s)) {
|
||||||
|
blkdev_put(bdev, mode);
|
||||||
return PTR_ERR(s);
|
return PTR_ERR(s);
|
||||||
|
}
|
||||||
|
|
||||||
if (s->s_root) {
|
if (s->s_root) {
|
||||||
/* Don't summarily change the RO/RW state. */
|
/* Don't summarily change the RO/RW state. */
|
||||||
|
@ -3482,6 +3482,12 @@ static int shmem_parse_options(struct fs_context *fc, void *data)
|
|||||||
{
|
{
|
||||||
char *options = data;
|
char *options = data;
|
||||||
|
|
||||||
|
if (options) {
|
||||||
|
int err = security_sb_eat_lsm_opts(options, &fc->security);
|
||||||
|
if (err)
|
||||||
|
return err;
|
||||||
|
}
|
||||||
|
|
||||||
while (options != NULL) {
|
while (options != NULL) {
|
||||||
char *this_char = options;
|
char *this_char = options;
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user