[PATCH] nfsd: misc endianness annotations
[powerpc.git] / include / linux / nfsd / nfsfh.h
index 31a3cb6..f3b51d6 100644 (file)
@@ -157,7 +157,7 @@ typedef struct svc_fh {
        __u64                   fh_post_size;   /* i_size */
        unsigned long           fh_post_blocks; /* i_blocks */
        unsigned long           fh_post_blksize;/* i_blksize */
-       __u32                   fh_post_rdev[2];/* i_rdev */
+       __be32                  fh_post_rdev[2];/* i_rdev */
        struct timespec         fh_post_atime;  /* i_atime */
        struct timespec         fh_post_mtime;  /* i_mtime */
        struct timespec         fh_post_ctime;  /* i_ctime */
@@ -209,9 +209,9 @@ extern char * SVCFH_fmt(struct svc_fh *fhp);
 /*
  * Function prototypes
  */
-u32    fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
-int    fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *);
-int    fh_update(struct svc_fh *);
+__be32 fh_verify(struct svc_rqst *, struct svc_fh *, int, int);
+__be32 fh_compose(struct svc_fh *, struct svc_export *, struct dentry *, struct svc_fh *);
+__be32 fh_update(struct svc_fh *);
 void   fh_put(struct svc_fh *);
 
 static __inline__ struct svc_fh *
@@ -290,8 +290,9 @@ fill_post_wcc(struct svc_fh *fhp)
  * vfs.c:nfsd_rename as it needs to grab 2 i_mutex's at once
  * so, any changes here should be reflected there.
  */
+
 static inline void
-fh_lock(struct svc_fh *fhp)
+fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
 {
        struct dentry   *dentry = fhp->fh_dentry;
        struct inode    *inode;
@@ -310,11 +311,17 @@ fh_lock(struct svc_fh *fhp)
        }
 
        inode = dentry->d_inode;
-       mutex_lock(&inode->i_mutex);
+       mutex_lock_nested(&inode->i_mutex, subclass);
        fill_pre_wcc(fhp);
        fhp->fh_locked = 1;
 }
 
+static inline void
+fh_lock(struct svc_fh *fhp)
+{
+       fh_lock_nested(fhp, I_MUTEX_NORMAL);
+}
+
 /*
  * Unlock a file handle/inode
  */