X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fnfsd%2Fnfsfh.h;h=d9c6c382165dd23165d025ae4cd044db9dcf7f8b;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=069257ea99a0fe4c92de7ccc4a993d88b35774ea;hpb=16c70f8c1b54b61c3b951b6fb220df250fe09b32;p=linux-2.6.git diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index 069257ea9..d9c6c3821 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h @@ -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,19 +209,15 @@ 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 * fh_copy(struct svc_fh *dst, struct svc_fh *src) { - if (src->fh_dentry || src->fh_locked) { - struct dentry *dentry = src->fh_dentry; - printk(KERN_ERR "fh_copy: copying %s/%s, already verified!\n", - dentry->d_parent->d_name.name, dentry->d_name.name); - } + WARN_ON(src->fh_dentry || src->fh_locked); *dst = *src; return dst; @@ -300,10 +296,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass) dfprintk(FILEOP, "nfsd: fh_lock(%s) locked = %d\n", SVCFH_fmt(fhp), fhp->fh_locked); - if (!fhp->fh_dentry) { - printk(KERN_ERR "fh_lock: fh not verified!\n"); - return; - } + BUG_ON(!dentry); + if (fhp->fh_locked) { printk(KERN_WARNING "fh_lock: %s/%s already locked!\n", dentry->d_parent->d_name.name, dentry->d_name.name); @@ -328,8 +322,7 @@ fh_lock(struct svc_fh *fhp) static inline void fh_unlock(struct svc_fh *fhp) { - if (!fhp->fh_dentry) - printk(KERN_ERR "fh_unlock: fh not verified!\n"); + BUG_ON(!fhp->fh_dentry); if (fhp->fh_locked) { fill_post_wcc(fhp);