Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2aefa104313996d1a9582476cee53d1296c834bf
Commit:     2aefa104313996d1a9582476cee53d1296c834bf
Parent:     5c36968343fcd013a3f7ae93f246c2e75596780b
Author:     Trond Myklebust <[EMAIL PROTECTED]>
AuthorDate: Sun Jun 17 15:40:59 2007 -0400
Committer:  Trond Myklebust <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 23:40:26 2007 -0400

    NFS: Remove the redundant 'dirty' and 'commit' lists from nfs_inode
    
    Signed-off-by: Trond Myklebust <[EMAIL PROTECTED]>
---
 fs/nfs/inode.c           |    3 ---
 fs/nfs/write.c           |    3 ---
 include/linux/nfs_fs.h   |    5 +----
 include/linux/nfs_page.h |    5 +----
 4 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c
index 7bcb3df..e7d2bba 100644
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -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);
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 0f779ca..9ef9ec7 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -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;
 }
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h
index 07eea8f..a942054 100644
--- a/include/linux/nfs_fs.h
+++ b/include/linux/nfs_fs.h
@@ -156,12 +156,9 @@ struct nfs_inode {
         * This is the list of dirty unwritten pages.
         */
        spinlock_t              req_lock;
-       struct list_head        dirty;
-       struct list_head        commit;
        struct radix_tree_root  nfs_page_tree;
 
-       unsigned int            ndirty,
-                               ncommit,
+       unsigned int            ncommit,
                                npages;
 
        /* Open contexts for shared mmap writes */
diff --git a/include/linux/nfs_page.h b/include/linux/nfs_page.h
index 481a421..78e6079 100644
--- a/include/linux/nfs_page.h
+++ b/include/linux/nfs_page.h
@@ -34,8 +34,7 @@
 
 struct nfs_inode;
 struct nfs_page {
-       struct list_head        wb_list,        /* Defines state of page: */
-                               *wb_list_head;  /*      read/write/commit */
+       struct list_head        wb_list;        /* Defines state of page: */
        struct page             *wb_page;       /* page to read in/write out */
        struct nfs_open_context *wb_context;    /* File state context info */
        atomic_t                wb_complete;    /* i/os we're waiting for */
@@ -118,7 +117,6 @@ static inline void
 nfs_list_add_request(struct nfs_page *req, struct list_head *head)
 {
        list_add_tail(&req->wb_list, head);
-       req->wb_list_head = head;
 }
 
 
@@ -132,7 +130,6 @@ nfs_list_remove_request(struct nfs_page *req)
        if (list_empty(&req->wb_list))
                return;
        list_del_init(&req->wb_list);
-       req->wb_list_head = NULL;
 }
 
 static inline struct nfs_page *
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to