aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2016-02-26 09:38:34 -0500
committerDavid Sterba <dsterba@suse.com>2016-02-26 09:38:34 -0500
commitf5bc27c71a1b0741cb93dbec0f216b012b21d93f (patch)
treefaff0fa1c1244d603a892525ee1391747c637677
parentfa695b01bceabc40be3267d309ca8a663de53d7a (diff)
parentd5131b658c2e906da11603da5d3cb4c3a445331d (diff)
Merge branch 'dev/control-ioctl' into for-chris-4.6
-rw-r--r--fs/btrfs/ctree.h1
-rw-r--r--fs/btrfs/ioctl.c5
-rw-r--r--fs/btrfs/super.c3
3 files changed, 6 insertions, 3 deletions
diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h
index c3e634924149..b69ad1305b71 100644
--- a/fs/btrfs/ctree.h
+++ b/fs/btrfs/ctree.h
@@ -4130,6 +4130,7 @@ void btrfs_test_inode_set_ops(struct inode *inode);
4130 4130
4131/* ioctl.c */ 4131/* ioctl.c */
4132long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg); 4132long btrfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
4133int btrfs_ioctl_get_supported_features(void __user *arg);
4133void btrfs_update_iflags(struct inode *inode); 4134void btrfs_update_iflags(struct inode *inode);
4134void btrfs_inherit_iflags(struct inode *inode, struct inode *dir); 4135void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
4135int btrfs_is_empty_uuid(u8 *uuid); 4136int btrfs_is_empty_uuid(u8 *uuid);
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index c1193b0c5e49..86249cf78897 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -5257,8 +5257,7 @@ out_unlock:
5257 .compat_ro_flags = BTRFS_FEATURE_COMPAT_RO_##suffix, \ 5257 .compat_ro_flags = BTRFS_FEATURE_COMPAT_RO_##suffix, \
5258 .incompat_flags = BTRFS_FEATURE_INCOMPAT_##suffix } 5258 .incompat_flags = BTRFS_FEATURE_INCOMPAT_##suffix }
5259 5259
5260static int btrfs_ioctl_get_supported_features(struct file *file, 5260int btrfs_ioctl_get_supported_features(void __user *arg)
5261 void __user *arg)
5262{ 5261{
5263 static const struct btrfs_ioctl_feature_flags features[3] = { 5262 static const struct btrfs_ioctl_feature_flags features[3] = {
5264 INIT_FEATURE_FLAGS(SUPP), 5263 INIT_FEATURE_FLAGS(SUPP),
@@ -5537,7 +5536,7 @@ long btrfs_ioctl(struct file *file, unsigned int
5537 case BTRFS_IOC_SET_FSLABEL: 5536 case BTRFS_IOC_SET_FSLABEL:
5538 return btrfs_ioctl_set_fslabel(file, argp); 5537 return btrfs_ioctl_set_fslabel(file, argp);
5539 case BTRFS_IOC_GET_SUPPORTED_FEATURES: 5538 case BTRFS_IOC_GET_SUPPORTED_FEATURES:
5540 return btrfs_ioctl_get_supported_features(file, argp); 5539 return btrfs_ioctl_get_supported_features(argp);
5541 case BTRFS_IOC_GET_FEATURES: 5540 case BTRFS_IOC_GET_FEATURES:
5542 return btrfs_ioctl_get_features(file, argp); 5541 return btrfs_ioctl_get_features(file, argp);
5543 case BTRFS_IOC_SET_FEATURES: 5542 case BTRFS_IOC_SET_FEATURES:
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index bf75200c6f86..a958f625793b 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -2190,6 +2190,9 @@ static long btrfs_control_ioctl(struct file *file, unsigned int cmd,
2190 break; 2190 break;
2191 ret = !(fs_devices->num_devices == fs_devices->total_devices); 2191 ret = !(fs_devices->num_devices == fs_devices->total_devices);
2192 break; 2192 break;
2193 case BTRFS_IOC_GET_SUPPORTED_FEATURES:
2194 ret = btrfs_ioctl_get_supported_features((void __user*)arg);
2195 break;
2193 } 2196 }
2194 2197
2195 kfree(vol); 2198 kfree(vol);