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
667667 RPCAUTH_info, RPCAUTH_EOF);
668668 if (error)
669669 goto err_depopulate;
670+ dget(dentry);
670671 out:
671672 mutex_unlock(&dir->i_mutex);
672673 rpc_release_path(&nd);
673− return dget(dentry);
674+ return dentry;
674675 err_depopulate:
675676 rpc_depopulate(dentry);
676677 __rpc_rmdir(dir, dentry);
@@ -731,10 +732,11 @@ rpc_mkpipe(char *path, void *private, struct rpc_pipe_ops *ops, int flags) · 54 unmodified lines
731732 rpci->flags = flags;
732733 rpci->ops = ops;
733734 inode_dir_notify(dir, DN_CREATE);
735+ dget(dentry);
734736 out:
735737 mutex_unlock(&dir->i_mutex);
736738 rpc_release_path(&nd);
737− return dget(dentry);
739+ return dentry;
738740 err_dput:
739741 dput(dentry);
740742 dentry = ERR_PTR(-ENOMEM);