diff options
author | Neil Brown <neilb@suse.de> | 2006-03-20 13:44:04 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-03-20 13:44:04 -0500 |
commit | 1dd594b21b2d98e56f2b1fe92bb222276b28de41 (patch) | |
tree | c11a062713429112f162dc986a1b4002b0da1c83 /fs/nfs | |
parent | cd52ed35535ef443f08bf5cd3331d350272885b8 (diff) |
NFS: Fix buglet in fs/nfs/write.c
I've been reading through fs/nfs/write.c trying to track down a bug
that seems to be related to pages loosing a refcount and getting
freed too early (you interested in detail??) and I spotted a little
bug which the following patch should fix.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 9449b6835509..d6ad449041eb 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -653,8 +653,11 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx, | |||
653 | spin_unlock(&nfsi->req_lock); | 653 | spin_unlock(&nfsi->req_lock); |
654 | error = nfs_wait_on_request(req); | 654 | error = nfs_wait_on_request(req); |
655 | nfs_release_request(req); | 655 | nfs_release_request(req); |
656 | if (error < 0) | 656 | if (error < 0) { |
657 | if (new) | ||
658 | nfs_release_request(new); | ||
657 | return ERR_PTR(error); | 659 | return ERR_PTR(error); |
660 | } | ||
658 | continue; | 661 | continue; |
659 | } | 662 | } |
660 | spin_unlock(&nfsi->req_lock); | 663 | spin_unlock(&nfsi->req_lock); |