diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-10-18 19:11:22 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-10-18 19:13:51 -0400 |
commit | 0c2e53f11a6dae9e3af5f50f5ad0382e7c3e0cfa (patch) | |
tree | a79761d89ca6ca2c9018724a6245b3a7566c89a9 /fs | |
parent | a9a4a87a5942e9271523197a90aaa82349c818fb (diff) |
NFS: Remove the unused "lookupfh()" version of nfs4_proc_lookup()
...and also remove the associated nfs_v4_clientops entry.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/nfs/nfs4proc.c | 62 |
1 files changed, 17 insertions, 45 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 0f0b6076de62..b0c01b23422d 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -73,9 +73,6 @@ static int _nfs4_proc_open(struct nfs4_opendata *data); | |||
73 | static int _nfs4_recover_proc_open(struct nfs4_opendata *data); | 73 | static int _nfs4_recover_proc_open(struct nfs4_opendata *data); |
74 | static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); | 74 | static int nfs4_do_fsinfo(struct nfs_server *, struct nfs_fh *, struct nfs_fsinfo *); |
75 | static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *, struct nfs4_state *); | 75 | static int nfs4_async_handle_error(struct rpc_task *, const struct nfs_server *, struct nfs4_state *); |
76 | static int _nfs4_proc_lookup(struct rpc_clnt *client, struct inode *dir, | ||
77 | const struct qstr *name, struct nfs_fh *fhandle, | ||
78 | struct nfs_fattr *fattr); | ||
79 | static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr); | 76 | static int _nfs4_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle, struct nfs_fattr *fattr); |
80 | static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred, | 77 | static int nfs4_do_setattr(struct inode *inode, struct rpc_cred *cred, |
81 | struct nfs_fattr *fattr, struct iattr *sattr, | 78 | struct nfs_fattr *fattr, struct iattr *sattr, |
@@ -2408,14 +2405,15 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
2408 | return status; | 2405 | return status; |
2409 | } | 2406 | } |
2410 | 2407 | ||
2411 | static int _nfs4_proc_lookupfh(struct rpc_clnt *clnt, struct nfs_server *server, | 2408 | static int _nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, |
2412 | const struct nfs_fh *dirfh, const struct qstr *name, | 2409 | const struct qstr *name, struct nfs_fh *fhandle, |
2413 | struct nfs_fh *fhandle, struct nfs_fattr *fattr) | 2410 | struct nfs_fattr *fattr) |
2414 | { | 2411 | { |
2412 | struct nfs_server *server = NFS_SERVER(dir); | ||
2415 | int status; | 2413 | int status; |
2416 | struct nfs4_lookup_arg args = { | 2414 | struct nfs4_lookup_arg args = { |
2417 | .bitmask = server->attr_bitmask, | 2415 | .bitmask = server->attr_bitmask, |
2418 | .dir_fh = dirfh, | 2416 | .dir_fh = NFS_FH(dir), |
2419 | .name = name, | 2417 | .name = name, |
2420 | }; | 2418 | }; |
2421 | struct nfs4_lookup_res res = { | 2419 | struct nfs4_lookup_res res = { |
@@ -2431,40 +2429,8 @@ static int _nfs4_proc_lookupfh(struct rpc_clnt *clnt, struct nfs_server *server, | |||
2431 | 2429 | ||
2432 | nfs_fattr_init(fattr); | 2430 | nfs_fattr_init(fattr); |
2433 | 2431 | ||
2434 | dprintk("NFS call lookupfh %s\n", name->name); | ||
2435 | status = nfs4_call_sync(clnt, server, &msg, &args.seq_args, &res.seq_res, 0); | ||
2436 | dprintk("NFS reply lookupfh: %d\n", status); | ||
2437 | return status; | ||
2438 | } | ||
2439 | |||
2440 | static int nfs4_proc_lookupfh(struct nfs_server *server, struct nfs_fh *dirfh, | ||
2441 | struct qstr *name, struct nfs_fh *fhandle, | ||
2442 | struct nfs_fattr *fattr) | ||
2443 | { | ||
2444 | struct nfs4_exception exception = { }; | ||
2445 | int err; | ||
2446 | do { | ||
2447 | err = _nfs4_proc_lookupfh(server->client, server, dirfh, name, fhandle, fattr); | ||
2448 | /* FIXME: !!!! */ | ||
2449 | if (err == -NFS4ERR_MOVED) { | ||
2450 | err = -EREMOTE; | ||
2451 | break; | ||
2452 | } | ||
2453 | err = nfs4_handle_exception(server, err, &exception); | ||
2454 | } while (exception.retry); | ||
2455 | return err; | ||
2456 | } | ||
2457 | |||
2458 | static int _nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, | ||
2459 | const struct qstr *name, struct nfs_fh *fhandle, | ||
2460 | struct nfs_fattr *fattr) | ||
2461 | { | ||
2462 | int status; | ||
2463 | |||
2464 | dprintk("NFS call lookup %s\n", name->name); | 2432 | dprintk("NFS call lookup %s\n", name->name); |
2465 | status = _nfs4_proc_lookupfh(clnt, NFS_SERVER(dir), NFS_FH(dir), name, fhandle, fattr); | 2433 | status = nfs4_call_sync(clnt, server, &msg, &args.seq_args, &res.seq_res, 0); |
2466 | if (status == -NFS4ERR_MOVED) | ||
2467 | status = nfs4_get_referral(dir, name, fattr, fhandle); | ||
2468 | dprintk("NFS reply lookup: %d\n", status); | 2434 | dprintk("NFS reply lookup: %d\n", status); |
2469 | return status; | 2435 | return status; |
2470 | } | 2436 | } |
@@ -2485,11 +2451,18 @@ static int nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qst | |||
2485 | struct nfs4_exception exception = { }; | 2451 | struct nfs4_exception exception = { }; |
2486 | int err; | 2452 | int err; |
2487 | do { | 2453 | do { |
2488 | err = nfs4_handle_exception(NFS_SERVER(dir), | 2454 | int status; |
2489 | _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr), | 2455 | |
2490 | &exception); | 2456 | status = _nfs4_proc_lookup(clnt, dir, name, fhandle, fattr); |
2491 | if (err == -EPERM) | 2457 | switch (status) { |
2458 | case -NFS4ERR_MOVED: | ||
2459 | err = nfs4_get_referral(dir, name, fattr, fhandle); | ||
2460 | break; | ||
2461 | case -NFS4ERR_WRONGSEC: | ||
2492 | nfs_fixup_secinfo_attributes(fattr, fhandle); | 2462 | nfs_fixup_secinfo_attributes(fattr, fhandle); |
2463 | } | ||
2464 | err = nfs4_handle_exception(NFS_SERVER(dir), | ||
2465 | status, &exception); | ||
2493 | } while (exception.retry); | 2466 | } while (exception.retry); |
2494 | return err; | 2467 | return err; |
2495 | } | 2468 | } |
@@ -6270,7 +6243,6 @@ const struct nfs_rpc_ops nfs_v4_clientops = { | |||
6270 | .getroot = nfs4_proc_get_root, | 6243 | .getroot = nfs4_proc_get_root, |
6271 | .getattr = nfs4_proc_getattr, | 6244 | .getattr = nfs4_proc_getattr, |
6272 | .setattr = nfs4_proc_setattr, | 6245 | .setattr = nfs4_proc_setattr, |
6273 | .lookupfh = nfs4_proc_lookupfh, | ||
6274 | .lookup = nfs4_proc_lookup, | 6246 | .lookup = nfs4_proc_lookup, |
6275 | .access = nfs4_proc_access, | 6247 | .access = nfs4_proc_access, |
6276 | .readlink = nfs4_proc_readlink, | 6248 | .readlink = nfs4_proc_readlink, |