NFS: Remove the redundant 'dirty' and 'commit' lists from nfs_inode
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -1149,14 +1149,11 @@ static void init_once(void * foo, struct kmem_cache * cachep, unsigned long flag
|
||||
|
||||
inode_init_once(&nfsi->vfs_inode);
|
||||
spin_lock_init(&nfsi->req_lock);
|
||||
INIT_LIST_HEAD(&nfsi->dirty);
|
||||
INIT_LIST_HEAD(&nfsi->commit);
|
||||
INIT_LIST_HEAD(&nfsi->open_files);
|
||||
INIT_LIST_HEAD(&nfsi->access_cache_entry_lru);
|
||||
INIT_LIST_HEAD(&nfsi->access_cache_inode_lru);
|
||||
INIT_RADIX_TREE(&nfsi->nfs_page_tree, GFP_ATOMIC);
|
||||
atomic_set(&nfsi->data_updates, 0);
|
||||
nfsi->ndirty = 0;
|
||||
nfsi->ncommit = 0;
|
||||
nfsi->npages = 0;
|
||||
nfs4_init_once(nfsi);
|
||||
|
@@ -459,7 +459,6 @@ nfs_mark_request_commit(struct nfs_page *req)
|
||||
struct nfs_inode *nfsi = NFS_I(inode);
|
||||
|
||||
spin_lock(&nfsi->req_lock);
|
||||
nfs_list_add_request(req, &nfsi->commit);
|
||||
nfsi->ncommit++;
|
||||
set_bit(PG_NEED_COMMIT, &(req)->wb_flags);
|
||||
radix_tree_tag_set(&nfsi->nfs_page_tree,
|
||||
@@ -581,8 +580,6 @@ nfs_scan_commit(struct inode *inode, struct list_head *dst, pgoff_t idx_start, u
|
||||
res = nfs_scan_list(nfsi, dst, idx_start, npages,
|
||||
NFS_PAGE_TAG_COMMIT);
|
||||
nfsi->ncommit -= res;
|
||||
if ((nfsi->ncommit == 0) != list_empty(&nfsi->commit))
|
||||
printk(KERN_ERR "NFS: desynchronized value of nfs_i.ncommit.\n");
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
Reference in New Issue
Block a user