]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Merge remote-tracking branch 'vfs/for-next'
authorStephen Rothwell <sfr@canb.auug.org.au>
Thu, 19 Sep 2013 01:06:04 +0000 (11:06 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 19 Sep 2013 01:06:04 +0000 (11:06 +1000)
Conflicts:
fs/nfs/direct.c
fs/nfs/file.c

1  2 
Documentation/filesystems/vfs.txt
fs/9p/vfs_file.c
fs/gfs2/inode.c
fs/nfs/direct.c
fs/nfs/file.c
fs/nfs/nfs4file.c
include/linux/fs.h

Simple merge
Simple merge
diff --cc fs/gfs2/inode.c
Simple merge
diff --cc fs/nfs/direct.c
index 239c2fe05ea5f2a5a16ccc10b3426e77a842e4d6,d71d66c9e0a1e6235cacdcdc41be6c045c65c554..87a6475eb170996972969b30779949742b1c4a57
@@@ -118,18 -117,26 +118,17 @@@ static inline int put_dreq(struct nfs_d
   * @nr_segs: size of iovec array
   *
   * The presence of this routine in the address space ops vector means
 - * the NFS client supports direct I/O. However, for most direct IO, we
 - * shunt off direct read and write requests before the VFS gets them,
 - * so this method is only ever called for swap.
 + * the NFS client supports direct I/O. However, we shunt off direct
 + * read and write requests before the VFS gets them, so this method
 + * should never be called.
   */
 -ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs)
 +ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, struct iov_iter *iter,
 +                    loff_t pos)
  {
-       dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n",
-                       iocb->ki_filp->f_path.dentry->d_name.name,
-                       (long long) pos, iter->nr_segs);
 -#ifndef CONFIG_NFS_SWAP
+       dprintk("NFS: nfs_direct_IO (%pD) off/no(%Ld/%lu) EINVAL\n",
 -                      iocb->ki_filp, (long long) pos, nr_segs);
++                      iocb->ki_filp, (long long) pos, iter->nr_segs);
  
        return -EINVAL;
 -#else
 -      VM_BUG_ON(iocb->ki_nbytes != PAGE_SIZE);
 -
 -      if (rw == READ || rw == KERNEL_READ)
 -              return nfs_file_direct_read(iocb, iov, nr_segs, pos,
 -                              rw == READ ? true : false);
 -      return nfs_file_direct_write(iocb, iov, nr_segs, pos,
 -                              rw == WRITE ? true : false);
 -#endif /* CONFIG_NFS_SWAP */
  }
  
  static void nfs_direct_release_pages(struct page **pages, unsigned int npages)
@@@ -1010,13 -905,11 +1009,11 @@@ ssize_t nfs_file_direct_read(struct kio
        struct address_space *mapping = file->f_mapping;
        size_t count;
  
 -      count = iov_length(iov, nr_segs);
 +      count = iov_iter_count(iter);
        nfs_add_stats(mapping->host, NFSIOS_DIRECTREADBYTES, count);
  
-       dfprintk(FILE, "NFS: direct read(%s/%s, %zd@%Ld)\n",
-               file->f_path.dentry->d_parent->d_name.name,
-               file->f_path.dentry->d_name.name,
-               count, (long long) pos);
+       dfprintk(FILE, "NFS: direct read(%pD2, %zd@%Ld)\n",
+               file, count, (long long) pos);
  
        retval = 0;
        if (!count)
@@@ -1065,13 -959,11 +1062,11 @@@ ssize_t nfs_file_direct_write(struct ki
        struct address_space *mapping = file->f_mapping;
        size_t count;
  
 -      count = iov_length(iov, nr_segs);
 +      count = iov_iter_count(iter);
        nfs_add_stats(mapping->host, NFSIOS_DIRECTWRITTENBYTES, count);
  
-       dfprintk(FILE, "NFS: direct write(%s/%s, %zd@%Ld)\n",
-               file->f_path.dentry->d_parent->d_name.name,
-               file->f_path.dentry->d_name.name,
-               count, (long long) pos);
+       dfprintk(FILE, "NFS: direct write(%pD2, %zd@%Ld)\n",
+               file, count, (long long) pos);
  
        retval = generic_write_checks(file, &pos, &count, 0);
        if (retval)
diff --cc fs/nfs/file.c
index 19ac4fd4054460136a0164b848015b80594a8025,e2fcacf07de349c6d937991744fbcbbd4c4c91fc..e022fe909ded953ae0403e1252d6fb8597d7c4c7
@@@ -174,18 -165,18 +165,17 @@@ nfs_file_flush(struct file *file, fl_ow
  EXPORT_SYMBOL_GPL(nfs_file_flush);
  
  ssize_t
 -nfs_file_read(struct kiocb *iocb, const struct iovec *iov,
 -              unsigned long nr_segs, loff_t pos)
 +nfs_file_read_iter(struct kiocb *iocb, struct iov_iter *iter, loff_t pos)
  {
-       struct dentry * dentry = iocb->ki_filp->f_path.dentry;
-       struct inode * inode = dentry->d_inode;
+       struct inode *inode = file_inode(iocb->ki_filp);
        ssize_t result;
  
        if (iocb->ki_filp->f_flags & O_DIRECT)
 -              return nfs_file_direct_read(iocb, iov, nr_segs, pos, true);
 +              return nfs_file_direct_read(iocb, iter, pos);
  
-       dprintk("NFS: read_iter(%s/%s, %lu@%lu)\n",
-               dentry->d_parent->d_name.name, dentry->d_name.name,
 -      dprintk("NFS: read(%pD2, %lu@%lu)\n",
++      dprintk("NFS: read_iter(%pD2, %lu@%lu)\n",
+               iocb->ki_filp,
 -              (unsigned long) iov_length(iov, nr_segs), (unsigned long) pos);
 +              (unsigned long) iov_iter_count(iter), (unsigned long) pos);
  
        result = nfs_revalidate_mapping(inode, iocb->ki_filp->f_mapping);
        if (!result) {
@@@ -655,25 -634,24 +633,24 @@@ static int nfs_need_sync_write(struct f
        return 0;
  }
  
 -ssize_t nfs_file_write(struct kiocb *iocb, const struct iovec *iov,
 -                     unsigned long nr_segs, loff_t pos)
 +ssize_t nfs_file_write_iter(struct kiocb *iocb, struct iov_iter *iter,
 +                          loff_t pos)
  {
-       struct dentry * dentry = iocb->ki_filp->f_path.dentry;
-       struct inode * inode = dentry->d_inode;
+       struct file *file = iocb->ki_filp;
+       struct inode *inode = file_inode(file);
        unsigned long written = 0;
        ssize_t result;
 -      size_t count = iov_length(iov, nr_segs);
 +      size_t count = iov_iter_count(iter);
  
-       result = nfs_key_timeout_notify(iocb->ki_filp, inode);
+       result = nfs_key_timeout_notify(file, inode);
        if (result)
                return result;
  
-       if (iocb->ki_filp->f_flags & O_DIRECT)
+       if (file->f_flags & O_DIRECT)
 -              return nfs_file_direct_write(iocb, iov, nr_segs, pos, true);
 +              return nfs_file_direct_write(iocb, iter, pos);
  
-       dprintk("NFS: write_iter(%s/%s, %lu@%lld)\n",
-               dentry->d_parent->d_name.name, dentry->d_name.name,
-               (unsigned long) count, (long long) pos);
 -      dprintk("NFS: write(%pD2, %lu@%Ld)\n",
++      dprintk("NFS: write_iter(%pD2, %lu@%Ld)\n",
+               file, (unsigned long) count, (long long) pos);
  
        result = -EBUSY;
        if (IS_SWAPFILE(inode))
Simple merge
Simple merge