]> Git Repo - linux.git/commitdiff
Merge tag 'nfs-for-3.18-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
authorLinus Torvalds <[email protected]>
Sat, 18 Oct 2014 19:52:08 +0000 (12:52 -0700)
committerLinus Torvalds <[email protected]>
Sat, 18 Oct 2014 19:52:08 +0000 (12:52 -0700)
Pull NFS client updates from Trond Myklebust:
 "Highlights include:

  Stable fixes:
   - fix an uninitialised pointer Oops in the writeback error path
   - fix a bogus warning (and early exit from the loop) in nfs_generic_pgio()

  Features:
   - Add NFSv4.2 SEEK feature and client support for lseek(SEEK_HOLE/SEEK_DATA)

  Other fixes:
   - pnfs: replace broken pnfs_put_lseg_async
   - Remove dead prototype for nfs4_insert_deviceid_node"

* tag 'nfs-for-3.18-2' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Fix a bogus warning in nfs_generic_pgio
  NFS: Fix an uninitialised pointer Oops in the writeback error path
  NFSv4.1/pnfs: replace broken pnfs_put_lseg_async
  NFSv4: Remove dead prototype for nfs4_insert_deviceid_node()
  NFS: Implement SEEK

1  2 
fs/nfs/nfs4file.c

diff --combined fs/nfs/nfs4file.c
index 3e987ad9ae2547488f6a24d9ac0a411c122028ac,4dffa3a6473109cf8b9afd5608ffb142d9e5974c..c51fb4db9bfef6d6d43c11841264b1180be3a039
@@@ -8,6 -8,10 +8,10 @@@
  #include "fscache.h"
  #include "pnfs.h"
  
+ #ifdef CONFIG_NFS_V4_2
+ #include "nfs42.h"
+ #endif
  #define NFSDBG_FACILITY               NFSDBG_FILE
  
  static int
@@@ -115,8 -119,29 +119,29 @@@ nfs4_file_fsync(struct file *file, loff
        return ret;
  }
  
+ #ifdef CONFIG_NFS_V4_2
+ static loff_t nfs4_file_llseek(struct file *filep, loff_t offset, int whence)
+ {
+       loff_t ret;
+       switch (whence) {
+       case SEEK_HOLE:
+       case SEEK_DATA:
+               ret = nfs42_proc_llseek(filep, offset, whence);
+               if (ret != -ENOTSUPP)
+                       return ret;
+       default:
+               return nfs_file_llseek(filep, offset, whence);
+       }
+ }
+ #endif /* CONFIG_NFS_V4_2 */
  const struct file_operations nfs4_file_operations = {
+ #ifdef CONFIG_NFS_V4_2
+       .llseek         = nfs4_file_llseek,
+ #else
        .llseek         = nfs_file_llseek,
+ #endif
        .read           = new_sync_read,
        .write          = new_sync_write,
        .read_iter      = nfs_file_read,
        .splice_read    = nfs_file_splice_read,
        .splice_write   = iter_file_splice_write,
        .check_flags    = nfs_check_flags,
 -      .setlease       = nfs_setlease,
 +      .setlease       = simple_nosetlease,
  };
This page took 0.092877 seconds and 4 git commands to generate.