[PATCH 1/2] autofs: Use autofs4_free_ino() to kfree dentry data

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

 



kfree dentry data allocated by autofs4_new_ino() with
autofs4_free_ino() instead of raw kfree.
(since we have the interface to free autofs_info*)

Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@xxxxxxxxx>
---
 fs/autofs4/inode.c | 2 +-
 fs/autofs4/root.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 8357544..ad0ee93 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -339,7 +339,7 @@ fail_dput:
 	dput(root);
 	goto fail_free;
 fail_ino:
-	kfree(ino);
+	autofs4_free_ino(ino);
 fail_free:
 	put_pid(sbi->oz_pgrp);
 	kfree(sbi);
diff --git a/fs/autofs4/root.c b/fs/autofs4/root.c
index 3767f66..93d3232 100644
--- a/fs/autofs4/root.c
+++ b/fs/autofs4/root.c
@@ -578,7 +578,7 @@ static int autofs4_dir_symlink(struct inode *dir,
 	if (!inode) {
 		kfree(cp);
 		if (!dentry->d_fsdata)
-			kfree(ino);
+			autofs4_free_ino(ino);
 		return -ENOMEM;
 	}
 	inode->i_private = cp;
-- 
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