History

SUNRPC: Fix obvious refcounting bugs in rpc_pipefs.

Doh!

Trond Myklebust committed 20 years ago

Commit 5c3e9851 parent e0ab53d1 file · +4 −2Browse files

Showing the changes to net (1 of 1 file). Show all

Unified · Split

net/sunrpc/rpc_pipe.c+4−2
@@ -667,10 +667,11 @@ rpc_mkdir(char *path, struct rpc_clnt *rpc_client) · 666 unmodified lines
667 RPCAUTH_info, RPCAUTH_EOF);667 RPCAUTH_info, RPCAUTH_EOF);
668 if (error)668 if (error)
669 goto err_depopulate;669 goto err_depopulate;
670 dget(dentry);
670out:671out:
671 mutex_unlock(&dir->i_mutex);672 mutex_unlock(&dir->i_mutex);
672 rpc_release_path(&nd);673 rpc_release_path(&nd);
673 return dget(dentry);674 return dentry;
674err_depopulate:675err_depopulate:
675 rpc_depopulate(dentry);676 rpc_depopulate(dentry);
676 __rpc_rmdir(dir, dentry);677 __rpc_rmdir(dir, dentry);
@@ -731,10 +732,11 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags) · 54 unmodified lines
731 rpci->flags = flags;732 rpci->flags = flags;
732 rpci->ops = ops;733 rpci->ops = ops;
733 inode_dir_notify(dir, DN_CREATE);734 inode_dir_notify(dir, DN_CREATE);
735 dget(dentry);
734out:736out:
735 mutex_unlock(&dir->i_mutex);737 mutex_unlock(&dir->i_mutex);
736 rpc_release_path(&nd);738 rpc_release_path(&nd);
737 return dget(dentry);739 return dentry;
738err_dput:740err_dput:
739 dput(dentry);741 dput(dentry);
740 dentry = ERR_PTR(-ENOMEM);742 dentry = ERR_PTR(-ENOMEM);