diff mbox series

btrfs: drop ret in ioctl_quota_rescan_status

Message ID c37927ff2082701c940d0aaad2301e4774159d74.1627452869.git.anand.jain@oracle.com (mailing list archive)
State New, archived
Headers show
Series btrfs: drop ret in ioctl_quota_rescan_status | expand

Commit Message

Anand Jain July 28, 2021, 6:20 a.m. UTC
There is no need for the variable ret after the patch [1]. Drop it.
 btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
David,

 You may choose to roll this patch into the following patch,
  [PATCH 5/7] btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack

Thx.

 fs/btrfs/ioctl.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

David Sterba Aug. 19, 2021, 12:43 p.m. UTC | #1
On Wed, Jul 28, 2021 at 02:20:41PM +0800, Anand Jain wrote:
> There is no need for the variable ret after the patch [1]. Drop it.
>  btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack
> 
> Signed-off-by: Anand Jain <anand.jain@oracle.com>

Added to misc-next, thanks.

> ---
> David,
> 
>  You may choose to roll this patch into the following patch,
>   [PATCH 5/7] btrfs: Allocate btrfs_ioctl_quota_rescan_args on stack

Too late and it's an separate change anyway.
diff mbox series

Patch

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 0f1cc8f489d4..693422acb33b 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -4405,7 +4405,6 @@  static long btrfs_ioctl_quota_rescan_status(struct btrfs_fs_info *fs_info,
 						void __user *arg)
 {
 	struct btrfs_ioctl_quota_rescan_args qsa = {0};
-	int ret = 0;
 
 	if (!capable(CAP_SYS_ADMIN))
 		return -EPERM;
@@ -4416,9 +4415,9 @@  static long btrfs_ioctl_quota_rescan_status(struct btrfs_fs_info *fs_info,
 	}
 
 	if (copy_to_user(arg, &qsa, sizeof(qsa)))
-		ret = -EFAULT;
+		return -EFAULT;
 
-	return ret;
+	return 0;
 }
 
 static long btrfs_ioctl_quota_rescan_wait(struct btrfs_fs_info *fs_info,