summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-10-15 22:20:11 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-10-15 22:20:11 +0200
commit275058a2188903786e42b380ea5889ef0a7cdf95 (patch)
tree179af948a1457578485b312a0a04dcf804d69ab4 /fs/nfs
parentnfs42: add NFS_IOC_CLONE_RANGE ioctl (diff)
downloadlinux-275058a2188903786e42b380ea5889ef0a7cdf95.tar.xz
linux-275058a2188903786e42b380ea5889ef0a7cdf95.zip
NFS: Fix an 'unused variable' complaint when #ifndef CONFIG_NFS_V4_2
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/nfs4file.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c
index 4384a1d00ceb..4aa571956cd6 100644
--- a/fs/nfs/nfs4file.c
+++ b/fs/nfs/nfs4file.c
@@ -298,6 +298,17 @@ static long nfs42_ioctl_clone_range(struct file *dst_file, void __user *argp)
return nfs42_ioctl_clone(dst_file, args.src_fd, args.src_off, args.dst_off, args.count);
}
+#else
+static long nfs42_ioctl_clone(struct file *dst_file, unsigned long srcfd,
+ u64 src_off, u64 dst_off, u64 count)
+{
+ return -ENOTTY;
+}
+
+static long nfs42_ioctl_clone_range(struct file *dst_file, void __user *argp)
+{
+ return -ENOTTY;
+}
#endif /* CONFIG_NFS_V4_2 */
long nfs4_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
@@ -305,12 +316,10 @@ long nfs4_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
void __user *argp = (void __user *)arg;
switch (cmd) {
-#ifdef CONFIG_NFS_V4_2
case NFS_IOC_CLONE:
return nfs42_ioctl_clone(file, arg, 0, 0, 0);
case NFS_IOC_CLONE_RANGE:
return nfs42_ioctl_clone_range(file, argp);
-#endif
}
return -ENOTTY;