summaryrefslogtreecommitdiff
path: root/fs/ubifs/lpt.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:07:20 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-09-26 21:07:20 -0400
commit5905db5ca0ac9a6d5bfe87f86b87cd1bdec3755a (patch)
tree6edb13ed37d842ef0b70d072b94e4c78010f90cf /fs/ubifs/lpt.c
parentc5aa1e554a20fb3542c62688ae46049c9225a965 (diff)
parent6f0f9b6b3fcfe5e156f20d4f804f0d505c750b3c (diff)
Merge remote branch 'origin' into for-next
Diffstat (limited to 'fs/ubifs/lpt.c')
-rw-r--r--fs/ubifs/lpt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index ce33b2beb151..8640920766ed 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1749,7 +1749,10 @@ int ubifs_lpt_init(struct ubifs_info *c, int rd, int wr)
return 0;
out_err:
- ubifs_lpt_free(c, 0);
+ if (wr)
+ ubifs_lpt_free(c, 1);
+ if (rd)
+ ubifs_lpt_free(c, 0);
return err;
}