diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-07 17:10:06 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-06-07 17:10:06 -0700 |
commit | 3975d16760d4be7402d1067c548c30c427971331 (patch) | |
tree | 4fa12ee1e8aabf1352307455163dabe293ed4874 /fs/jffs2/fs.c | |
parent | 4d3d769c605ebdf9fbb5a9d63827598b48351861 (diff) | |
parent | 1c24d06f8e065023ebb428db5af5514500839ee6 (diff) | |
download | linux-3975d16760d4be7402d1067c548c30c427971331.tar.gz linux-3975d16760d4be7402d1067c548c30c427971331.tar.bz2 linux-3975d16760d4be7402d1067c548c30c427971331.zip |
Merge git://git.infradead.org/~dwmw2/mtd-2.6.35
* git://git.infradead.org/~dwmw2/mtd-2.6.35:
jffs2: update ctime when changing the file's permission by setfacl
jffs2: Fix NFS race by using insert_inode_locked()
jffs2: Fix in-core inode leaks on error paths
mtd: Fix NAND submenu
mtd/r852: update card detect early.
mtd/r852: Fixes in case of DMA timeout
mtd/r852: register IRQ as last step
drivers/mtd: Use memdup_user
docbook: make mtd nand module init static
Diffstat (limited to 'fs/jffs2/fs.c')
-rw-r--r-- | fs/jffs2/fs.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fs/jffs2/fs.c b/fs/jffs2/fs.c index 8bc2c80ab159..459d39d1ea0b 100644 --- a/fs/jffs2/fs.c +++ b/fs/jffs2/fs.c @@ -465,7 +465,12 @@ struct inode *jffs2_new_inode (struct inode *dir_i, int mode, struct jffs2_raw_i inode->i_blocks = 0; inode->i_size = 0; - insert_inode_hash(inode); + if (insert_inode_locked(inode) < 0) { + make_bad_inode(inode); + unlock_new_inode(inode); + iput(inode); + return ERR_PTR(-EINVAL); + } return inode; } |