summaryrefslogtreecommitdiff
path: root/fs/isofs/inode.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-01 14:27:38 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-01 14:27:38 -0300
commit1eae9639aac0f8de4d284f567ec722a822b52513 (patch)
tree34e45a5c5e6a1033a444bea952ba9199e57f3a19 /fs/isofs/inode.c
parent037d32aa8f748e39844d2a5b607fb063b4583843 (diff)
Linux-libre 4.8.6-gnupck-4.8.6-gnu
Diffstat (limited to 'fs/isofs/inode.c')
-rw-r--r--fs/isofs/inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index ad0c745eb..871c8b392 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -687,6 +687,11 @@ static int isofs_fill_super(struct super_block *s, void *data, int silent)
pri_bh = NULL;
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)) {
/* 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,
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);
}