btrfs: Remove unused variable mode in btrfs_mount
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Fri, 5 Oct 2018 12:26:15 +0000 (07:26 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:55 +0000 (13:34 +0200)
This is a leftover from 312c89fbca06 ("btrfs: cleanup btrfs_mount()
using btrfs_mount_root()"), the mode was used for opening devices that's
not done here anymore.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c

index db410c6..526dbae 100644 (file)
@@ -1603,14 +1603,10 @@ static struct dentry *btrfs_mount(struct file_system_type *fs_type, int flags,
 {
        struct vfsmount *mnt_root;
        struct dentry *root;
-       fmode_t mode = FMODE_READ;
        char *subvol_name = NULL;
        u64 subvol_objectid = 0;
        int error = 0;
 
-       if (!(flags & SB_RDONLY))
-               mode |= FMODE_WRITE;
-
        error = btrfs_parse_subvol_options(data, &subvol_name,
                                        &subvol_objectid);
        if (error) {