]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] jffs2: fix symlink error handling
authorAl Viro <viro@parcelfarce.linux.theplanet.co.uk>
Fri, 19 Aug 2005 21:42:16 +0000 (22:42 +0100)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 20 Aug 2005 00:57:19 +0000 (17:57 -0700)
commitc2288a076eb8dcd61a3b915474e4ade10c64c6dc
treed84587462e0378c5aa9c5581d6920d76242b8c65
parent7c874b500c87b3add0b2ca466aa50bbbdb5a3b0b
[PATCH] jffs2: fix symlink error handling

The current calling conventions for ->follow_link() are already fairly
complex.

What we have is
1) you can return -error; then you must release nameidata yourself
   and ->put_link() will _not_ be called.
2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
3) you can do nd_set_link(nd, path) and return 0
4) you can return 0 (after having moved nameidata yourself)

jffs2 follow_link() is broken - it has an exit where it returns
-EIO and leaks nameidata.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/jffs2/symlink.c