aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/lpt.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-02-03 17:12:42 -0500
committerJiri Kosina <jkosina@suse.cz>2012-02-03 17:13:05 -0500
commit972c5ae961d6e5103e2b33d935cfa4145fd47140 (patch)
tree350b2a76b979ba8766c09838617df67ff330eca0 /fs/ubifs/lpt.c
parent5196d20305d5e30d871111d3a876cf067dd94255 (diff)
parent7c7ed8ec337bf5f62cc5287a6eb6b2f1b7504c2f (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to a newer code (namely drivers/gpu/drm/gma500/psb_intel_lvds.c)
Diffstat (limited to 'fs/ubifs/lpt.c')
-rw-r--r--fs/ubifs/lpt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/ubifs/lpt.c b/fs/ubifs/lpt.c
index 6189c74d97f0..66d59d0a1402 100644
--- a/fs/ubifs/lpt.c
+++ b/fs/ubifs/lpt.c
@@ -1986,12 +1986,11 @@ again:
1986 1986
1987 if (path[h].in_tree) 1987 if (path[h].in_tree)
1988 continue; 1988 continue;
1989 nnode = kmalloc(sz, GFP_NOFS); 1989 nnode = kmemdup(&path[h].nnode, sz, GFP_NOFS);
1990 if (!nnode) { 1990 if (!nnode) {
1991 err = -ENOMEM; 1991 err = -ENOMEM;
1992 goto out; 1992 goto out;
1993 } 1993 }
1994 memcpy(nnode, &path[h].nnode, sz);
1995 parent = nnode->parent; 1994 parent = nnode->parent;
1996 parent->nbranch[nnode->iip].nnode = nnode; 1995 parent->nbranch[nnode->iip].nnode = nnode;
1997 path[h].ptr.nnode = nnode; 1996 path[h].ptr.nnode = nnode;
@@ -2004,12 +2003,11 @@ again:
2004 const size_t sz = sizeof(struct ubifs_pnode); 2003 const size_t sz = sizeof(struct ubifs_pnode);
2005 struct ubifs_nnode *parent; 2004 struct ubifs_nnode *parent;
2006 2005
2007 pnode = kmalloc(sz, GFP_NOFS); 2006 pnode = kmemdup(&path[h].pnode, sz, GFP_NOFS);
2008 if (!pnode) { 2007 if (!pnode) {
2009 err = -ENOMEM; 2008 err = -ENOMEM;
2010 goto out; 2009 goto out;
2011 } 2010 }
2012 memcpy(pnode, &path[h].pnode, sz);
2013 parent = pnode->parent; 2011 parent = pnode->parent;
2014 parent->nbranch[pnode->iip].pnode = pnode; 2012 parent->nbranch[pnode->iip].pnode = pnode;
2015 path[h].ptr.pnode = pnode; 2013 path[h].ptr.pnode = pnode;