Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull misc filesystem fixes from Jan Kara: "A fix for an isofs change apparently breaking mount(8) in some cases and one ext2 warning fix" * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: avoid bogus -Wmaybe-uninitialized warning isofs: Do not return EACCES for unknown filesystems
This commit is contained in:
commit
a28ad14e05
|
@ -622,7 +622,7 @@ static int ext2_get_blocks(struct inode *inode,
|
||||||
u32 *bno, bool *new, bool *boundary,
|
u32 *bno, bool *new, bool *boundary,
|
||||||
int create)
|
int create)
|
||||||
{
|
{
|
||||||
int err = -EIO;
|
int err;
|
||||||
int offsets[4];
|
int offsets[4];
|
||||||
Indirect chain[4];
|
Indirect chain[4];
|
||||||
Indirect *partial;
|
Indirect *partial;
|
||||||
|
@ -639,7 +639,7 @@ static int ext2_get_blocks(struct inode *inode,
|
||||||
depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
|
depth = ext2_block_to_path(inode,iblock,offsets,&blocks_to_boundary);
|
||||||
|
|
||||||
if (depth == 0)
|
if (depth == 0)
|
||||||
return (err);
|
return -EIO;
|
||||||
|
|
||||||
partial = ext2_get_branch(inode, depth, offsets, chain, &err);
|
partial = ext2_get_branch(inode, depth, offsets, chain, &err);
|
||||||
/* Simplest case - block found, no allocation needed */
|
/* Simplest case - block found, no allocation needed */
|
||||||
|
@ -761,7 +761,6 @@ static int ext2_get_blocks(struct inode *inode,
|
||||||
ext2_splice_branch(inode, iblock, partial, indirect_blks, count);
|
ext2_splice_branch(inode, iblock, partial, indirect_blks, count);
|
||||||
mutex_unlock(&ei->truncate_mutex);
|
mutex_unlock(&ei->truncate_mutex);
|
||||||
got_it:
|
got_it:
|
||||||
*bno = le32_to_cpu(chain[depth-1].key);
|
|
||||||
if (count > blocks_to_boundary)
|
if (count > blocks_to_boundary)
|
||||||
*boundary = true;
|
*boundary = true;
|
||||||
err = count;
|
err = count;
|
||||||
|
@ -772,6 +771,8 @@ cleanup:
|
||||||
brelse(partial->bh);
|
brelse(partial->bh);
|
||||||
partial--;
|
partial--;
|
||||||
}
|
}
|
||||||
|
if (err > 0)
|
||||||
|
*bno = le32_to_cpu(chain[depth-1].key);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -687,6 +687,11 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
|
||||||
pri_bh = NULL;
|
pri_bh = NULL;
|
||||||
|
|
||||||
root_found:
|
root_found:
|
||||||
|
/* We don't support read-write mounts */
|
||||||
|
if (!(s->s_flags & MS_RDONLY)) {
|
||||||
|
error = -EACCES;
|
||||||
|
goto out_freebh;
|
||||||
|
}
|
||||||
|
|
||||||
if (joliet_level && (pri == NULL || !opt.rock)) {
|
if (joliet_level && (pri == NULL || !opt.rock)) {
|
||||||
/* This is the case of Joliet with the norock mount flag.
|
/* This is the case of Joliet with the norock mount flag.
|
||||||
|
@ -1501,9 +1506,6 @@ struct inode *__isofs_iget(struct super_block *sb,
|
||||||
static struct dentry *isofs_mount(struct file_system_type *fs_type,
|
static struct dentry *isofs_mount(struct file_system_type *fs_type,
|
||||||
int flags, const char *dev_name, void *data)
|
int flags, const char *dev_name, void *data)
|
||||||
{
|
{
|
||||||
/* We don't support read-write mounts */
|
|
||||||
if (!(flags & MS_RDONLY))
|
|
||||||
return ERR_PTR(-EACCES);
|
|
||||||
return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
|
return mount_bdev(fs_type, flags, dev_name, data, isofs_fill_super);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue