]> git.dujemihanovic.xyz Git - linux.git/commitdiff
btrfs: use common vfs LABEL ioctl definitions
authorEric Sandeen <sandeen@redhat.com>
Wed, 17 Jul 2019 17:39:20 +0000 (12:39 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 9 Sep 2019 12:58:59 +0000 (14:58 +0200)
I lifted the btrfs label get/set ioctls to the vfs some time ago, but
never followed up to use those common definitions directly in btrfs.

This patch does that.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c
include/uapi/linux/btrfs.h

index 0a0c54e99b2247131bd21b74a5b40c93e60a3727..9eaf78d7b8eb4aad74c6f81d4f1669ad3420bb64 100644 (file)
@@ -5453,6 +5453,10 @@ long btrfs_ioctl(struct file *file, unsigned int
                return btrfs_ioctl_setflags(file, argp);
        case FS_IOC_GETVERSION:
                return btrfs_ioctl_getversion(file, argp);
+       case FS_IOC_GETFSLABEL:
+               return btrfs_ioctl_get_fslabel(file, argp);
+       case FS_IOC_SETFSLABEL:
+               return btrfs_ioctl_set_fslabel(file, argp);
        case FITRIM:
                return btrfs_ioctl_fitrim(file, argp);
        case BTRFS_IOC_SNAP_CREATE:
@@ -5564,10 +5568,6 @@ long btrfs_ioctl(struct file *file, unsigned int
                return btrfs_ioctl_quota_rescan_wait(file, argp);
        case BTRFS_IOC_DEV_REPLACE:
                return btrfs_ioctl_dev_replace(fs_info, argp);
-       case BTRFS_IOC_GET_FSLABEL:
-               return btrfs_ioctl_get_fslabel(file, argp);
-       case BTRFS_IOC_SET_FSLABEL:
-               return btrfs_ioctl_set_fslabel(file, argp);
        case BTRFS_IOC_GET_SUPPORTED_FEATURES:
                return btrfs_ioctl_get_supported_features(argp);
        case BTRFS_IOC_GET_FEATURES:
index c195896d478f295ee80b667597a6c400696ac0dc..7885d79f75158ee5daf7fb32dc786d90dc68cfaa 100644 (file)
@@ -917,10 +917,8 @@ enum btrfs_err_code {
 #define BTRFS_IOC_QUOTA_RESCAN_STATUS _IOR(BTRFS_IOCTL_MAGIC, 45, \
                               struct btrfs_ioctl_quota_rescan_args)
 #define BTRFS_IOC_QUOTA_RESCAN_WAIT _IO(BTRFS_IOCTL_MAGIC, 46)
-#define BTRFS_IOC_GET_FSLABEL _IOR(BTRFS_IOCTL_MAGIC, 49, \
-                                  char[BTRFS_LABEL_SIZE])
-#define BTRFS_IOC_SET_FSLABEL _IOW(BTRFS_IOCTL_MAGIC, 50, \
-                                  char[BTRFS_LABEL_SIZE])
+#define BTRFS_IOC_GET_FSLABEL  FS_IOC_GETFSLABEL
+#define BTRFS_IOC_SET_FSLABEL  FS_IOC_SETFSLABEL
 #define BTRFS_IOC_GET_DEV_STATS _IOWR(BTRFS_IOCTL_MAGIC, 52, \
                                      struct btrfs_ioctl_get_dev_stats)
 #define BTRFS_IOC_DEV_REPLACE _IOWR(BTRFS_IOCTL_MAGIC, 53, \