]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
NFS: remove error field from nfs_readdir_descriptor_t
authorJeff Layton <jlayton@redhat.com>
Tue, 12 Feb 2008 11:49:01 +0000 (06:49 -0500)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 14 Feb 2008 04:24:07 +0000 (23:24 -0500)
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>
fs/nfs/dir.c

index 476cb0f837fd191d08898c87674d7a1fe51e84ee..ae04892a5e5d23922cec2575ffa4609ced0afde7 100644 (file)
@@ -154,7 +154,6 @@ typedef struct {
        struct nfs_entry *entry;
        decode_dirent_t decode;
        int             plus;
-       int             error;
        unsigned long   timestamp;
        int             timestamp_valid;
 } nfs_readdir_descriptor_t;
@@ -213,7 +212,6 @@ int nfs_readdir_filler(nfs_readdir_descriptor_t *desc, struct page *page)
        return 0;
  error:
        unlock_page(page);
-       desc->error = error;
        return -EIO;
 }
 
@@ -483,13 +481,13 @@ int uncached_readdir(nfs_readdir_descriptor_t *desc, void *dirent,
                goto out;
        }
        timestamp = jiffies;
-       desc->error = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred, *desc->dir_cookie,
-                                               page,
+       status = NFS_PROTO(inode)->readdir(file->f_path.dentry, cred,
+                                               *desc->dir_cookie, page,
                                                NFS_SERVER(inode)->dtsize,
                                                desc->plus);
        desc->page = page;
        desc->ptr = kmap(page);         /* matching kunmap in nfs_do_filldir */
-       if (desc->error >= 0) {
+       if (status >= 0) {
                desc->timestamp = timestamp;
                desc->timestamp_valid = 1;
                if ((status = dir_decode(desc)) == 0)