aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorBryan Schumaker <bjschuma@netapp.com>2012-04-27 13:27:43 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2012-04-27 14:10:03 -0400
commite245d4250d0326cfcf7c816a2081b6ab2ea810be (patch)
tree1424c497bdcd1305137b18201a3086a365595a72 /fs
parent7e6eb683d260d9325f0d1bd911518d5ed3cb4f0c (diff)
NFS: Remove unused function nfs_lookup_with_sec()
This fixes a compiler warning. Signed-off-by: Bryan Schumaker <bjschuma@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/nfs/namespace.c62
1 files changed, 0 insertions, 62 deletions
diff --git a/fs/nfs/namespace.c b/fs/nfs/namespace.c
index 78dde307317f..d51868e5683c 100644
--- a/fs/nfs/namespace.c
+++ b/fs/nfs/namespace.c
@@ -148,59 +148,6 @@ rpc_authflavor_t nfs_find_best_sec(struct nfs4_secinfo_flavors *flavors)
148 return pseudoflavor; 148 return pseudoflavor;
149} 149}
150 150
151static int nfs_negotiate_security(const struct dentry *parent,
152 const struct dentry *dentry,
153 rpc_authflavor_t *flavor)
154{
155 struct page *page;
156 struct nfs4_secinfo_flavors *flavors;
157 int (*secinfo)(struct inode *, const struct qstr *, struct nfs4_secinfo_flavors *);
158 int ret = -EPERM;
159
160 secinfo = NFS_PROTO(parent->d_inode)->secinfo;
161 if (secinfo != NULL) {
162 page = alloc_page(GFP_KERNEL);
163 if (!page) {
164 ret = -ENOMEM;
165 goto out;
166 }
167 flavors = page_address(page);
168 ret = secinfo(parent->d_inode, &dentry->d_name, flavors);
169 *flavor = nfs_find_best_sec(flavors);
170 put_page(page);
171 }
172
173out:
174 return ret;
175}
176
177static int nfs_lookup_with_sec(struct nfs_server *server, struct dentry *parent,
178 struct dentry *dentry, struct path *path,
179 struct nfs_fh *fh, struct nfs_fattr *fattr,
180 rpc_authflavor_t *flavor)
181{
182 struct rpc_clnt *clone;
183 struct rpc_auth *auth;
184 int err;
185
186 err = nfs_negotiate_security(parent, path->dentry, flavor);
187 if (err < 0)
188 goto out;
189 clone = rpc_clone_client(server->client);
190 auth = rpcauth_create(*flavor, clone);
191 if (!auth) {
192 err = -EIO;
193 goto out_shutdown;
194 }
195 err = server->nfs_client->rpc_ops->lookup(clone, parent->d_inode,
196 &path->dentry->d_name,
197 fh, fattr);
198out_shutdown:
199 rpc_shutdown_client(clone);
200out:
201 return err;
202}
203
204static struct rpc_clnt *nfs_lookup_mountpoint(struct inode *dir, 151static struct rpc_clnt *nfs_lookup_mountpoint(struct inode *dir,
205 struct qstr *name, 152 struct qstr *name,
206 struct nfs_fh *fh, 153 struct nfs_fh *fh,
@@ -217,15 +164,6 @@ static struct rpc_clnt *nfs_lookup_mountpoint(struct inode *dir,
217 return rpc_clone_client(NFS_SERVER(dir)->client); 164 return rpc_clone_client(NFS_SERVER(dir)->client);
218} 165}
219#else /* CONFIG_NFS_V4 */ 166#else /* CONFIG_NFS_V4 */
220static inline int nfs_lookup_with_sec(struct nfs_server *server,
221 struct dentry *parent, struct dentry *dentry,
222 struct path *path, struct nfs_fh *fh,
223 struct nfs_fattr *fattr,
224 rpc_authflavor_t *flavor)
225{
226 return -EPERM;
227}
228
229static inline struct rpc_clnt *nfs_lookup_mountpoint(struct inode *dir, 167static inline struct rpc_clnt *nfs_lookup_mountpoint(struct inode *dir,
230 struct qstr *name, 168 struct qstr *name,
231 struct nfs_fh *fh, 169 struct nfs_fh *fh,