All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs: Remove unused variable mode in btrfs_mount
@ 2018-10-05 12:26 Goldwyn Rodrigues
  2018-10-05 12:27 ` Nikolay Borisov
  2018-10-08 13:03 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Goldwyn Rodrigues @ 2018-10-05 12:26 UTC (permalink / raw)
  To: linux-btrfs

Code cleanup.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@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) {

-- 
Goldwyn

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: Remove unused variable mode in btrfs_mount
  2018-10-05 12:26 [PATCH] btrfs: Remove unused variable mode in btrfs_mount Goldwyn Rodrigues
@ 2018-10-05 12:27 ` Nikolay Borisov
  2018-10-08 13:03 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: Nikolay Borisov @ 2018-10-05 12:27 UTC (permalink / raw)
  To: Goldwyn Rodrigues, linux-btrfs



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) {
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: Remove unused variable mode in btrfs_mount
  2018-10-05 12:26 [PATCH] btrfs: Remove unused variable mode in btrfs_mount Goldwyn Rodrigues
  2018-10-05 12:27 ` Nikolay Borisov
@ 2018-10-08 13:03 ` David Sterba
  2018-10-08 14:44   ` Goldwyn Rodrigues
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2018-10-08 13:03 UTC (permalink / raw)
  To: Goldwyn Rodrigues; +Cc: linux-btrfs

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.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] btrfs: Remove unused variable mode in btrfs_mount
  2018-10-08 13:03 ` David Sterba
@ 2018-10-08 14:44   ` Goldwyn Rodrigues
  0 siblings, 0 replies; 4+ messages in thread
From: Goldwyn Rodrigues @ 2018-10-08 14:44 UTC (permalink / raw)
  To: dsterba, linux-btrfs; +Cc: misono.tomohiro

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.

-- 
Goldwyn

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-10-08 14:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-05 12:26 [PATCH] btrfs: Remove unused variable mode in btrfs_mount Goldwyn Rodrigues
2018-10-05 12:27 ` Nikolay Borisov
2018-10-08 13:03 ` David Sterba
2018-10-08 14:44   ` Goldwyn Rodrigues

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.