projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7fd062
)
NFSv4.1: need to put_layout_hdr on _pnfs_return_layout error path
author
Benny Halevy
<benny@tonian.com>
Wed, 15 Jun 2011 15:39:57 +0000
(11:39 -0400)
committer
Trond Myklebust
<Trond.Myklebust@netapp.com>
Wed, 15 Jun 2011 15:52:15 +0000
(11:52 -0400)
We always get a reference on the layout header and we rely on
nfs4_layoutreturn_release to put it. If we hit an allocation error
before starting the rpc proc we bail out early without dereferncing
the layout header properly.
Signed-off-by: Benny Halevy <benny@tonian.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/pnfs.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/nfs/pnfs.c
b/fs/nfs/pnfs.c
index d066aad608add367f0669993228e40d016282a5e..8f958228125277e66497ca50adf34274107befed 100644
(file)
--- a/
fs/nfs/pnfs.c
+++ b/
fs/nfs/pnfs.c
@@
-652,6
+652,7
@@
_pnfs_return_layout(struct inode *ino)
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
if (unlikely(lrp == NULL)) {
status = -ENOMEM;
+ put_layout_hdr(lo);
goto out;
}