diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-25 14:15:11 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2011-03-27 11:48:07 -0400 |
commit | 4d65c520fb4abed970069d18c119cfe85624f46d (patch) | |
tree | 74671eb263380317f1e4a958a6a7f73749e98eec /fs/nfs/pagelist.c | |
parent | 16c29dafcc86024048f1dbb8349d31cb22c7c55a (diff) |
NFS: Fix a hang in the writeback path
Now that the inode scalability patches have been merged, it is no longer
safe to call igrab() under the inode->i_lock.
Now that we no longer call nfs_clear_request() until the nfs_page is
being freed, we know that we are always holding a reference to the
nfs_open_context, which again holds a reference to the path, and so
the inode cannot be freed until the last nfs_page has been removed
from the radix tree and freed.
We can therefore skip the igrab()/iput() altogether.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 87a593c2b055..c80add6e2213 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c | |||
@@ -135,14 +135,14 @@ void nfs_clear_page_tag_locked(struct nfs_page *req) | |||
135 | nfs_unlock_request(req); | 135 | nfs_unlock_request(req); |
136 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /* |
139 | * nfs_clear_request - Free up all resources allocated to the request | 139 | * nfs_clear_request - Free up all resources allocated to the request |
140 | * @req: | 140 | * @req: |
141 | * | 141 | * |
142 | * Release page and open context resources associated with a read/write | 142 | * Release page and open context resources associated with a read/write |
143 | * request after it has completed. | 143 | * request after it has completed. |
144 | */ | 144 | */ |
145 | void nfs_clear_request(struct nfs_page *req) | 145 | static void nfs_clear_request(struct nfs_page *req) |
146 | { | 146 | { |
147 | struct page *page = req->wb_page; | 147 | struct page *page = req->wb_page; |
148 | struct nfs_open_context *ctx = req->wb_context; | 148 | struct nfs_open_context *ctx = req->wb_context; |