NFS: remove error field from nfs_readdir_descriptor_t
The error field in nfs_readdir_descriptor_t is never used outside of the function in which it is set. Remove the field and change the place that does use it to use an existing local variable. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
497799e7c0
commit
25606656b1
|
@ -154,7 +154,6 @@ typedef struct {
|
||||||
struct nfs_entry *entry;
|
struct nfs_entry *entry;
|
||||||
decode_dirent_t decode;
|
decode_dirent_t decode;
|
||||||
int plus;
|
int plus;
|
||||||
int error;
|
|
||||||
unsigned long timestamp;
|
unsigned long timestamp;
|
||||||
int timestamp_valid;
|
int timestamp_valid;
|
||||||
} nfs_readdir_descriptor_t;
|
} nfs_readdir_descriptor_t;
|
||||||
|
@ -213,7 +212,6 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
|
||||||
return 0;
|
return 0;
|
||||||
error:
|
error:
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
desc->error = error;
|
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -483,13 +481,13 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
timestamp = jiffies;
|
timestamp = jiffies;
|
||||||
desc->error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, *desc->dir_cookie,
|
status = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred,
|
||||||
page,
|
*desc->dir_cookie, page,
|
||||||
NFS_SERVER(inode)->dtsize,
|
NFS_SERVER(inode)->dtsize,
|
||||||
desc->plus);
|
desc->plus);
|
||||||
desc->page = page;
|
desc->page = page;
|
||||||
desc->ptr = kmap(page); /* matching kunmap in nfs_do_filldir */
|
desc->ptr = kmap(page); /* matching kunmap in nfs_do_filldir */
|
||||||
if (desc->error >= 0) {
|
if (status >= 0) {
|
||||||
desc->timestamp = timestamp;
|
desc->timestamp = timestamp;
|
||||||
desc->timestamp_valid = 1;
|
desc->timestamp_valid = 1;
|
||||||
if ((status = dir_decode(desc)) == 0)
|
if ((status = dir_decode(desc)) == 0)
|
||||||
|
|
Loading…
Reference in a new issue