aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/nfs_xdr.h
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2006-08-22 20:06:22 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-09-22 23:24:52 -0400
commit4f390c152bc87165da4b1f5b7d870b46fb106d4e (patch)
tree643b5d12f76bd7d3688380fbaf69f607a34a06bf /include/linux/nfs_xdr.h
parentd3db90e270791b21cd00d3c094884bffa907cc9e (diff)
NFS: Fix double d_drop in nfs_instantiate() error path
If the LOOKUP or GETATTR in nfs_instantiate fail, nfs_instantiate will do a d_drop before returning. But some callers already do a d_drop in the case of an error return. Make certain we do only one d_drop in all error paths. This issue was introduced because over time, the symlink proc API diverged slightly from the create/mkdir/mknod proc API. To prevent other coding mistakes of this type, change the symlink proc API to be more like create/mkdir/mknod and move the nfs_instantiate call into the symlink proc routines so it is used in exactly the same way for create, mkdir, mknod, and symlink. Test plan: Connectathon, all versions of NFS. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include/linux/nfs_xdr.h')
-rw-r--r--include/linux/nfs_xdr.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/nfs_xdr.h b/include/linux/nfs_xdr.h
index 0f33e621892f..ddf5d75e97a2 100644
--- a/include/linux/nfs_xdr.h
+++ b/include/linux/nfs_xdr.h
@@ -793,9 +793,8 @@ struct nfs_rpc_ops {
793 int (*rename) (struct inode *, struct qstr *, 793 int (*rename) (struct inode *, struct qstr *,
794 struct inode *, struct qstr *); 794 struct inode *, struct qstr *);
795 int (*link) (struct inode *, struct inode *, struct qstr *); 795 int (*link) (struct inode *, struct inode *, struct qstr *);
796 int (*symlink) (struct inode *, struct qstr *, struct qstr *, 796 int (*symlink) (struct inode *, struct dentry *, struct qstr *,
797 struct iattr *, struct nfs_fh *, 797 struct iattr *);
798 struct nfs_fattr *);
799 int (*mkdir) (struct inode *, struct dentry *, struct iattr *); 798 int (*mkdir) (struct inode *, struct dentry *, struct iattr *);
800 int (*rmdir) (struct inode *, struct qstr *); 799 int (*rmdir) (struct inode *, struct qstr *);
801 int (*readdir) (struct dentry *, struct rpc_cred *, 800 int (*readdir) (struct dentry *, struct rpc_cred *,