]> Git Repo - linux.git/blobdiff - fs/nfsd/nfsfh.h
Merge branch 'exec-update-lock-for-v5.11' of git://git.kernel.org/pub/scm/linux/kerne...
[linux.git] / fs / nfsd / nfsfh.h
index 56cfbc36156184657590ec14f58dd050afa431d6..cb20c2cd346959df6744e3a84ad8e77aae7b973c 100644 (file)
@@ -35,6 +35,12 @@ typedef struct svc_fh {
 
        bool                    fh_locked;      /* inode locked by us */
        bool                    fh_want_write;  /* remount protection taken */
+       bool                    fh_no_wcc;      /* no wcc data needed */
+       bool                    fh_no_atomic_attr;
+                                               /*
+                                                * wcc data is not atomic with
+                                                * operation
+                                                */
        int                     fh_flags;       /* FH flags */
 #ifdef CONFIG_NFSD_V3
        bool                    fh_post_saved;  /* post-op attrs saved */
@@ -54,7 +60,6 @@ typedef struct svc_fh {
        struct kstat            fh_post_attr;   /* full attrs after operation */
        u64                     fh_post_change; /* nfsv4 change; see above */
 #endif /* CONFIG_NFSD_V3 */
-
 } svc_fh;
 #define NFSD4_FH_FOREIGN (1<<0)
 #define SET_FH_FLAG(c, f) ((c)->fh_flags |= (f))
@@ -259,13 +264,16 @@ fh_clear_wcc(struct svc_fh *fhp)
 static inline u64 nfsd4_change_attribute(struct kstat *stat,
                                         struct inode *inode)
 {
-       u64 chattr;
-
-       chattr =  stat->ctime.tv_sec;
-       chattr <<= 30;
-       chattr += stat->ctime.tv_nsec;
-       chattr += inode_query_iversion(inode);
-       return chattr;
+       if (IS_I_VERSION(inode)) {
+               u64 chattr;
+
+               chattr =  stat->ctime.tv_sec;
+               chattr <<= 30;
+               chattr += stat->ctime.tv_nsec;
+               chattr += inode_query_iversion(inode);
+               return chattr;
+       } else
+               return time_to_chattr(&stat->ctime);
 }
 
 extern void fill_pre_wcc(struct svc_fh *fhp);
This page took 0.031087 seconds and 4 git commands to generate.