Merge branch 'for-3.19' of git://linux-nfs.org/~bfields/linux
[cascardo/linux.git] / fs / nfsd / vfs.c
index cb00e48..5685c67 100644 (file)
@@ -951,7 +951,6 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
                                unsigned long *cnt, int *stablep)
 {
        struct svc_export       *exp;
-       struct dentry           *dentry;
        struct inode            *inode;
        mm_segment_t            oldfs;
        __be32                  err = 0;
@@ -971,8 +970,7 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct file *file,
                 */
                current->flags |= PF_LESS_THROTTLE;
 
-       dentry = file->f_path.dentry;
-       inode = dentry->d_inode;
+       inode = file_inode(file);
        exp   = fhp->fh_export;
 
        use_wgather = (rqstp->rq_vers == 2) && EX_WGATHER(exp);
@@ -1844,10 +1842,12 @@ struct readdir_data {
        int             full;
 };
 
-static int nfsd_buffered_filldir(void *__buf, const char *name, int namlen,
-                                loff_t offset, u64 ino, unsigned int d_type)
+static int nfsd_buffered_filldir(struct dir_context *ctx, const char *name,
+                                int namlen, loff_t offset, u64 ino,
+                                unsigned int d_type)
 {
-       struct readdir_data *buf = __buf;
+       struct readdir_data *buf =
+               container_of(ctx, struct readdir_data, ctx);
        struct buffered_dirent *de = (void *)(buf->dirent + buf->used);
        unsigned int reclen;
 
@@ -1867,7 +1867,7 @@ static int nfsd_buffered_filldir(void *__buf, const char *name, int namlen,
        return 0;
 }
 
-static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func,
+static __be32 nfsd_buffered_readdir(struct file *file, nfsd_filldir_t func,
                                    struct readdir_cd *cdp, loff_t *offsetp)
 {
        struct buffered_dirent *de;
@@ -1951,7 +1951,7 @@ static __be32 nfsd_buffered_readdir(struct file *file, filldir_t func,
  */
 __be32
 nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp, 
-            struct readdir_cd *cdp, filldir_t func)
+            struct readdir_cd *cdp, nfsd_filldir_t func)
 {
        __be32          err;
        struct file     *file;