@@ -309,18 +309,6 @@ static long nfs42_ioctl_clone_range(struct file *dst_file, void __user *argp)
309309 return nfs42_ioctl_clone (dst_file , args .src_fd , args .src_offset ,
310310 args .dest_offset , args .src_length );
311311}
312- #else
313- static long nfs42_ioctl_clone (struct file * dst_file , unsigned long srcfd ,
314- u64 src_off , u64 dst_off , u64 count )
315- {
316- return - ENOTTY ;
317- }
318-
319- static long nfs42_ioctl_clone_range (struct file * dst_file , void __user * argp )
320- {
321- return - ENOTTY ;
322- }
323- #endif /* CONFIG_NFS_V4_2 */
324312
325313long nfs4_ioctl (struct file * file , unsigned int cmd , unsigned long arg )
326314{
@@ -335,13 +323,9 @@ long nfs4_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
335323
336324 return - ENOTTY ;
337325}
326+ #endif /* CONFIG_NFS_V4_2 */
338327
339328const struct file_operations nfs4_file_operations = {
340- #ifdef CONFIG_NFS_V4_2
341- .llseek = nfs4_file_llseek ,
342- #else
343- .llseek = nfs_file_llseek ,
344- #endif
345329 .read_iter = nfs_file_read ,
346330 .write_iter = nfs_file_write ,
347331 .mmap = nfs_file_mmap ,
@@ -353,11 +337,14 @@ const struct file_operations nfs4_file_operations = {
353337 .flock = nfs_flock ,
354338 .splice_read = nfs_file_splice_read ,
355339 .splice_write = iter_file_splice_write ,
356- #ifdef CONFIG_NFS_V4_2
357- .fallocate = nfs42_fallocate ,
358- #endif /* CONFIG_NFS_V4_2 */
359340 .check_flags = nfs_check_flags ,
360341 .setlease = simple_nosetlease ,
342+ #ifdef CONFIG_NFS_V4_2
343+ .llseek = nfs4_file_llseek ,
344+ .fallocate = nfs42_fallocate ,
361345 .unlocked_ioctl = nfs4_ioctl ,
362346 .compat_ioctl = nfs4_ioctl ,
347+ #else
348+ .llseek = nfs_file_llseek ,
349+ #endif
363350};
0 commit comments