diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 22:02:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-22 22:02:39 -0400 |
commit | bbd9d6f7fbb0305c9a592bf05a32e87eb364a4ff (patch) | |
tree | 12b2bb4202b05f6ae6a43c6ce830a0472043dbe5 /net/sunrpc | |
parent | 8e204874db000928e37199c2db82b7eb8966cc3c (diff) | |
parent | 5a9a43646cf709312d71eca71cef90ad802f28f9 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (107 commits)
vfs: use ERR_CAST for err-ptr tossing in lookup_instantiate_filp
isofs: Remove global fs lock
jffs2: fix IN_DELETE_SELF on overwriting rename() killing a directory
fix IN_DELETE_SELF on overwriting rename() on ramfs et.al.
mm/truncate.c: fix build for CONFIG_BLOCK not enabled
fs:update the NOTE of the file_operations structure
Remove dead code in dget_parent()
AFS: Fix silly characters in a comment
switch d_add_ci() to d_splice_alias() in "found negative" case as well
simplify gfs2_lookup()
jfs_lookup(): don't bother with . or ..
get rid of useless dget_parent() in btrfs rename() and link()
get rid of useless dget_parent() in fs/btrfs/ioctl.c
fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
drivers: fix up various ->llseek() implementations
fs: handle SEEK_HOLE/SEEK_DATA properly in all fs's that define their own llseek
Ext4: handle SEEK_HOLE/SEEK_DATA generically
Btrfs: implement our own ->llseek
fs: add SEEK_HOLE and SEEK_DATA flags
reiserfs: make reiserfs default to barrier=flush
...
Fix up trivial conflicts in fs/xfs/linux-2.6/xfs_super.c due to the new
shrinker callout for the inode cache, that clashed with the xfs code to
start the periodic workers later.
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/clnt.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 7389b7da3a8d..c50818f0473b 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
@@ -97,8 +97,7 @@ static int | |||
97 | rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | 97 | rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) |
98 | { | 98 | { |
99 | static uint32_t clntid; | 99 | static uint32_t clntid; |
100 | struct nameidata nd; | 100 | struct path path, dir; |
101 | struct path path; | ||
102 | char name[15]; | 101 | char name[15]; |
103 | struct qstr q = { | 102 | struct qstr q = { |
104 | .name = name, | 103 | .name = name, |
@@ -113,7 +112,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
113 | path.mnt = rpc_get_mount(); | 112 | path.mnt = rpc_get_mount(); |
114 | if (IS_ERR(path.mnt)) | 113 | if (IS_ERR(path.mnt)) |
115 | return PTR_ERR(path.mnt); | 114 | return PTR_ERR(path.mnt); |
116 | error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &nd); | 115 | error = vfs_path_lookup(path.mnt->mnt_root, path.mnt, dir_name, 0, &dir); |
117 | if (error) | 116 | if (error) |
118 | goto err; | 117 | goto err; |
119 | 118 | ||
@@ -121,7 +120,7 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
121 | q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); | 120 | q.len = snprintf(name, sizeof(name), "clnt%x", (unsigned int)clntid++); |
122 | name[sizeof(name) - 1] = '\0'; | 121 | name[sizeof(name) - 1] = '\0'; |
123 | q.hash = full_name_hash(q.name, q.len); | 122 | q.hash = full_name_hash(q.name, q.len); |
124 | path.dentry = rpc_create_client_dir(nd.path.dentry, &q, clnt); | 123 | path.dentry = rpc_create_client_dir(dir.dentry, &q, clnt); |
125 | if (!IS_ERR(path.dentry)) | 124 | if (!IS_ERR(path.dentry)) |
126 | break; | 125 | break; |
127 | error = PTR_ERR(path.dentry); | 126 | error = PTR_ERR(path.dentry); |
@@ -132,11 +131,11 @@ rpc_setup_pipedir(struct rpc_clnt *clnt, char *dir_name) | |||
132 | goto err_path_put; | 131 | goto err_path_put; |
133 | } | 132 | } |
134 | } | 133 | } |
135 | path_put(&nd.path); | 134 | path_put(&dir); |
136 | clnt->cl_path = path; | 135 | clnt->cl_path = path; |
137 | return 0; | 136 | return 0; |
138 | err_path_put: | 137 | err_path_put: |
139 | path_put(&nd.path); | 138 | path_put(&dir); |
140 | err: | 139 | err: |
141 | rpc_put_mount(); | 140 | rpc_put_mount(); |
142 | return error; | 141 | return error; |