mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 17:11:46 +00:00
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>
This commit is contained in:
parent
7c563cc9f3
commit
dfb4f30983
6 changed files with 25 additions and 41 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue