]> git.baikalelectronics.ru Git - kernel.git/commit
ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path
authorOGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Mon, 11 Jan 2010 18:36:14 +0000 (03:36 +0900)
committerAl Viro <viro@zeniv.linux.org.uk>
Thu, 14 Jan 2010 14:05:26 +0000 (09:05 -0500)
commit3675eefdf0af4da04a98d1ebb28256145eaade06
treea063df1524ed862ef2475052e1cc1c66de390dc2
parent80d677ce0c2c171277622545cd552508d528a6e0
ecryptfs: Fix refcnt leak on ecryptfs_follow_link() error path

If ->follow_link handler return the error, it should decrement
nd->path refcnt. But, ecryptfs_follow_link() doesn't decrement.

This patch fix it by using usual nd_set_link() style error handling,
instead of playing with nd->path.

Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ecryptfs/inode.c