summaryrefslogtreecommitdiff
path: root/fs/nfs/unlink.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2010-09-24 09:17:01 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2010-09-24 09:17:01 -0400
commitdfb4f309830359352539919f23accc59a20a3758 (patch)
treec692dbb873e212bd919e6b98dac62478cb9ba968 /fs/nfs/unlink.c
parent7c563cc9f3f4aca70c27bd08a135499227f67014 (diff)
downloadkernel-common-dfb4f309830359352539919f23accc59a20a3758.tar.gz
kernel-common-dfb4f309830359352539919f23accc59a20a3758.tar.bz2
kernel-common-dfb4f309830359352539919f23accc59a20a3758.zip
NFSv4.1: keep seq_res.sr_slot as pointer rather than an index
Having to explicitly initialize sr_slotid to NFS4_MAX_SLOT_TABLE resulted in numerous bugs. Keeping the current slot as a pointer to the slot table is more straight forward and robust as it's implicitly set up to NULL wherever the seq_res member is initialized to zeroes. Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/unlink.c')
-rw-r--r--fs/nfs/unlink.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/nfs/unlink.c b/fs/nfs/unlink.c
index 47530aacebfd..9a16bad5d2ea 100644
--- a/fs/nfs/unlink.c
+++ b/fs/nfs/unlink.c
@@ -262,7 +262,6 @@ nfs_async_unlink(struct inode *dir, struct dentry *dentry)
status = PTR_ERR(data->cred);
goto out_free;
}
- data->res.seq_res.sr_slotid = NFS4_MAX_SLOT_TABLE;
data->res.dir_attr = &data->dir_attr;
status = -EBUSY;
@@ -427,7 +426,7 @@ nfs_async_rename(struct inode *old_dir, struct inode *new_dir,
.flags = RPC_TASK_ASYNC,
};
- data = kmalloc(sizeof(*data), GFP_KERNEL);
+ data = kzalloc(sizeof(*data), GFP_KERNEL);
if (data == NULL)
return ERR_PTR(-ENOMEM);
task_setup_data.callback_data = data,