Skip to contentSkip to conversation

btrfs: Remove unused parameter "name" from btrfs_qgroup_create

PATCH In review Kevin Brandstatter 2 participants 2 messages Jul 5, 2014 – Jul 10, 2014 Btrfs file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 btrfs: Remove unused parameter "name" from btrfs_qgroup_create

in btrfs_qgruop_create a fourth parameter "name" exists. however this parameter is not used anywhere in the function the only other place this function is called is ioctl and the call passes NULL as the name paremeter which would seem to indicate its lack of necessity.

---
 fs/btrfs/ioctl.c  | 3 +--
 fs/btrfs/qgroup.c | 2 +-
 fs/btrfs/qgroup.h | 3 +--
 3 files changed, 3 insertions(+), 5 deletions(-)
fs/btrfs/ioctl.c +0 -0
index 2a99f49..4b33d08 100644
@@ -4709,8 +4709,7 @@ static long btrfs_ioctl_qgroup_create(struct file

*file, void __user *arg)

     /* FIXME: check if the IDs really exist */
     if (sa->create) {
-        ret = btrfs_create_qgroup(trans, root->fs_info, sa->qgroupid,
-                      NULL);
+        ret = btrfs_create_qgroup(trans, root->fs_info, sa->qgroupid);
     } else {
         ret = btrfs_remove_qgroup(trans, root->fs_info, sa->qgroupid);
     }
fs/btrfs/qgroup.c +1 -1
index 98cb6b2..3d1c8be 100644
@@ -1091,7 +1091,7 @@ out:
 }
 
 int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
-            struct btrfs_fs_info *fs_info, u64 qgroupid, char *name)
+            struct btrfs_fs_info *fs_info, u64 qgroupid)
 {
     struct btrfs_root *quota_root;
     struct btrfs_qgroup *qgroup;
fs/btrfs/qgroup.h +0 -0
index 5952ff1..31403ca 100644
@@ -69,8 +69,7 @@ int btrfs_add_qgroup_relation(struct

btrfs_trans_handle *trans,
int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans,

                   struct btrfs_fs_info *fs_info, u64 src, u64 dst);
 int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
-            struct btrfs_fs_info *fs_info, u64 qgroupid,
-            char *name);
+            struct btrfs_fs_info *fs_info, u64 qgroupid);
 int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
                   struct btrfs_fs_info *fs_info, u64 qgroupid);

int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,

Signature · 1 line
2.0.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Kevin Brandstatter

in btrfs_qgruop_create a fourth parameter "name" exists. however this parameter is not used anywhere in the function the only other place this function is called is ioctl and the call passes NULL as the name paremeter which would seem to indicate its lack of necessity.

Quoted 50 lines
---
  fs/btrfs/ioctl.c  | 3 +--
  fs/btrfs/qgroup.c | 2 +-
  fs/btrfs/qgroup.h | 3 +--
  3 files changed, 3 insertions(+), 5 deletions(-)
fs/btrfs/ioctl.c +1 -2
index 2a99f49..4b33d08 100644
@@ -4709,8 +4709,7 @@ static long btrfs_ioctl_qgroup_create(struct file
 *file, void __user *arg)
 
      /* FIXME: check if the IDs really exist */
      if (sa->create) {
-        ret = btrfs_create_qgroup(trans, root->fs_info, sa->qgroupid,
-                      NULL);
+        ret = btrfs_create_qgroup(trans, root->fs_info, sa->qgroupid);
      } else {
          ret = btrfs_remove_qgroup(trans, root->fs_info, sa->qgroupid);
      }
fs/btrfs/qgroup.c +1 -1
index 98cb6b2..3d1c8be 100644
@@ -1091,7 +1091,7 @@ out:
  }
 
  int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
-            struct btrfs_fs_info *fs_info, u64 qgroupid, char *name)
+            struct btrfs_fs_info *fs_info, u64 qgroupid)
  {
      struct btrfs_root *quota_root;
      struct btrfs_qgroup *qgroup;
fs/btrfs/qgroup.h +1 -2
index 5952ff1..31403ca 100644
@@ -69,8 +69,7 @@ int btrfs_add_qgroup_relation(struct
 btrfs_trans_handle *trans,
  int btrfs_del_qgroup_relation(struct btrfs_trans_handle *trans,
                    struct btrfs_fs_info *fs_info, u64 src, u64 dst);
  int btrfs_create_qgroup(struct btrfs_trans_handle *trans,
-            struct btrfs_fs_info *fs_info, u64 qgroupid,
-            char *name);
+            struct btrfs_fs_info *fs_info, u64 qgroupid);
  int btrfs_remove_qgroup(struct btrfs_trans_handle *trans,
                    struct btrfs_fs_info *fs_info, u64 qgroupid);

int btrfs_limit_qgroup(struct btrfs_trans_handle *trans,