These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / fs / nfsd / vfs.h
index 2050cb0..fcfc48c 100644 (file)
@@ -71,11 +71,7 @@ __be32               nfsd_commit(struct svc_rqst *, struct svc_fh *,
 #endif /* CONFIG_NFSD_V3 */
 __be32         nfsd_open(struct svc_rqst *, struct svc_fh *, umode_t,
                                int, struct file **);
-void           nfsd_close(struct file *);
 struct raparms;
-__be32         nfsd_get_tmp_read_open(struct svc_rqst *, struct svc_fh *,
-                               struct file **, struct raparms **);
-void           nfsd_put_tmp_read_open(struct file *, struct raparms *);
 __be32         nfsd_splice_read(struct svc_rqst *,
                                struct file *, loff_t, unsigned long *);
 __be32         nfsd_readv(struct file *, loff_t, struct kvec *, int,
@@ -84,6 +80,10 @@ __be32               nfsd_read(struct svc_rqst *, struct svc_fh *,
                                loff_t, struct kvec *, int, unsigned long *);
 __be32                 nfsd_write(struct svc_rqst *, struct svc_fh *,struct file *,
                                loff_t, struct kvec *,int, unsigned long *, int *);
+__be32         nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp,
+                               struct file *file, loff_t offset,
+                               struct kvec *vec, int vlen, unsigned long *cnt,
+                               int *stablep);
 __be32         nfsd_readlink(struct svc_rqst *, struct svc_fh *,
                                char *, int *);
 __be32         nfsd_symlink(struct svc_rqst *, struct svc_fh *,
@@ -104,19 +104,22 @@ __be32            nfsd_statfs(struct svc_rqst *, struct svc_fh *,
 __be32         nfsd_permission(struct svc_rqst *, struct svc_export *,
                                struct dentry *, int);
 
+struct raparms *nfsd_init_raparms(struct file *file);
+void           nfsd_put_raparams(struct file *file, struct raparms *ra);
+
 static inline int fh_want_write(struct svc_fh *fh)
 {
        int ret = mnt_want_write(fh->fh_export->ex_path.mnt);
 
        if (!ret)
-               fh->fh_want_write = 1;
+               fh->fh_want_write = true;
        return ret;
 }
 
 static inline void fh_drop_write(struct svc_fh *fh)
 {
        if (fh->fh_want_write) {
-               fh->fh_want_write = 0;
+               fh->fh_want_write = false;
                mnt_drop_write(fh->fh_export->ex_path.mnt);
        }
 }
@@ -128,4 +131,10 @@ static inline __be32 fh_getattr(struct svc_fh *fh, struct kstat *stat)
        return nfserrno(vfs_getattr(&p, stat));
 }
 
+static inline int nfsd_create_is_exclusive(int createmode)
+{
+       return createmode == NFS3_CREATE_EXCLUSIVE
+              || createmode == NFS4_CREATE_EXCLUSIVE4_1;
+}
+
 #endif /* LINUX_NFSD_VFS_H */