aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2007-01-13 02:28:11 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2007-02-03 18:35:06 -0500
commitc228fd3aeef55637354167faead74c579d5da28b (patch)
tree44abf437f19a3f182e00a42de6cf853fef8cc0f6 /fs/nfs/nfs4proc.c
parentfaebf4e2bb0efad9dda396ea13d5c6ad15d7d7fb (diff)
NFSv4: Cleanups for fs_locations code.
Start long arduous project... What the hell is struct dentry = {}; all about? Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b3fd29baadc3..665859214fa2 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1424,7 +1424,6 @@ static int nfs4_get_referral(struct inode *dir, struct qstr *name, struct nfs_fa
1424 int status = -ENOMEM; 1424 int status = -ENOMEM;
1425 struct page *page = NULL; 1425 struct page *page = NULL;
1426 struct nfs4_fs_locations *locations = NULL; 1426 struct nfs4_fs_locations *locations = NULL;
1427 struct dentry dentry = {};
1428 1427
1429 page = alloc_page(GFP_KERNEL); 1428 page = alloc_page(GFP_KERNEL);
1430 if (page == NULL) 1429 if (page == NULL)
@@ -1433,9 +1432,7 @@ static int nfs4_get_referral(struct inode *dir, struct qstr *name, struct nfs_fa
1433 if (locations == NULL) 1432 if (locations == NULL)
1434 goto out; 1433 goto out;
1435 1434
1436 dentry.d_name.name = name->name; 1435 status = nfs4_proc_fs_locations(dir, name, locations, page);
1437 dentry.d_name.len = name->len;
1438 status = nfs4_proc_fs_locations(dir, &dentry, locations, page);
1439 if (status != 0) 1436 if (status != 0)
1440 goto out; 1437 goto out;
1441 /* Make sure server returned a different fsid for the referral */ 1438 /* Make sure server returned a different fsid for the referral */
@@ -3585,7 +3582,7 @@ ssize_t nfs4_listxattr(struct dentry *dentry, char *buf, size_t buflen)
3585 return len; 3582 return len;
3586} 3583}
3587 3584
3588int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry, 3585int nfs4_proc_fs_locations(struct inode *dir, struct qstr *name,
3589 struct nfs4_fs_locations *fs_locations, struct page *page) 3586 struct nfs4_fs_locations *fs_locations, struct page *page)
3590{ 3587{
3591 struct nfs_server *server = NFS_SERVER(dir); 3588 struct nfs_server *server = NFS_SERVER(dir);
@@ -3595,7 +3592,7 @@ int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
3595 }; 3592 };
3596 struct nfs4_fs_locations_arg args = { 3593 struct nfs4_fs_locations_arg args = {
3597 .dir_fh = NFS_FH(dir), 3594 .dir_fh = NFS_FH(dir),
3598 .name = &dentry->d_name, 3595 .name = name,
3599 .page = page, 3596 .page = page,
3600 .bitmask = bitmask, 3597 .bitmask = bitmask,
3601 }; 3598 };
@@ -3607,7 +3604,7 @@ int nfs4_proc_fs_locations(struct inode *dir, struct dentry *dentry,
3607 int status; 3604 int status;
3608 3605
3609 dprintk("%s: start\n", __FUNCTION__); 3606 dprintk("%s: start\n", __FUNCTION__);
3610 fs_locations->fattr.valid = 0; 3607 nfs_fattr_init(&fs_locations->fattr);
3611 fs_locations->server = server; 3608 fs_locations->server = server;
3612 fs_locations->nlocations = 0; 3609 fs_locations->nlocations = 0;
3613 status = rpc_call_sync(server->client, &msg, 0); 3610 status = rpc_call_sync(server->client, &msg, 0);