[PATCH 2/2] autofs: Fix conditional to kfree dentry data

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if (!dentry->d_fsdata) should be testing d_fsdata or ino without !.

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx>
---
 fs/autofs4/root.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 93d3232..5a877bf 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -577,7 +577,7 @@ static int autofs4_dir_symlink(struct inode *dir,
 	inode = autofs4_get_inode(dir->i_sb, S_IFLNK | 0555);
 	if (!inode) {
 		kfree(cp);
-		if (!dentry->d_fsdata)
+		if (ino)
 			autofs4_free_ino(ino);
 		return -ENOMEM;
 	}
-- 
2.5.5

--
To unsubscribe from this list: send the line "unsubscribe autofs" in



[Index of Archives]     [Linux Filesystem Development]     [Linux Ext4]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux