Message ID | 20181005122615.da52bp6a6ie4jzzw@merlin (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: Remove unused variable mode in btrfs_mount | expand |
On 5.10.2018 15:26, Goldwyn Rodrigues wrote: > Code cleanup. > > Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> > > diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c > index e7f702761cb7..f7b8b7a6b86a 100644 > --- a/fs/btrfs/super.c > +++ b/fs/btrfs/super.c > @@ -1661,14 +1661,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) { >
On Fri, Oct 05, 2018 at 07:26:15AM -0500, Goldwyn Rodrigues wrote:
> Code cleanup.
Have you check when and why the variable become unused? Thanks.
On 15:03 08/10, David Sterba wrote: > On Fri, Oct 05, 2018 at 07:26:15AM -0500, Goldwyn Rodrigues wrote: > > Code cleanup. > > Have you check when and why the variable become unused? Thanks. No, I did not check it earlier. git blame points to 312c89fbca06 ("btrfs: cleanup btrfs_mount() using btrfs_mount_root()") Author cc'd.
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index e7f702761cb7..f7b8b7a6b86a 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1661,14 +1661,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) {
Code cleanup. Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>