From: Wang Guoli Date: Wed, 12 Feb 2014 20:44:54 +0000 (-0800) Subject: jffs2: unlock f->sem on error in jffs2_new_inode() X-Git-Tag: v3.15-rc1~65^2~82 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=01887a3a2353f1c2fc7488b871d6df8055acb109;p=pandora-kernel.git jffs2: unlock f->sem on error in jffs2_new_inode() If jffs2_new_inode() succeeds, it returns with f->sem held, and the caller is responsible for releasing the lock. If it fails, it still returns with the lock held, but the caller won't release the lock, which will lead to deadlock. Fix it by releasing the lock in jffs2_new_inode() on error. Signed-off-by: Wang Guoli Signed-off-by: Wang Nan Cc: Artem Bityutskiy Cc: David Woodhouse Cc: Wang Guoli Signed-off-by: Andrew Morton [Brian: not marked for stable; no one observed deadlock, and I don't think it can happen here] Signed-off-by: Brian Norris --- Reading git-diff-tree failed