aboutsummaryrefslogtreecommitdiffstats
path: root/fs/autofs4
diff options
context:
space:
mode:
authorJesper Juhl <jesper.juhl@gmail.com>2005-11-07 04:01:34 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-07 10:54:06 -0500
commitf99d49adf527fa6f7a9c42257fa76bca6b8df1e3 (patch)
tree41dddbc336016f9dc9557cdb15300de5e599dac1 /fs/autofs4
parent6044ec8882c726e325017bd948aa0cd94ad33abc (diff)
[PATCH] kfree cleanup: fs
This is the fs/ part of the big kfree cleanup patch. Remove pointless checks for NULL prior to calling kfree() in fs/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/autofs4')
-rw-r--r--fs/autofs4/inode.c6
-rw-r--r--fs/autofs4/waitq.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/fs/autofs4/inode.c b/fs/autofs4/inode.c
index 0a3c05d10167..818b37be5153 100644
--- a/fs/autofs4/inode.c
+++ b/fs/autofs4/inode.c
@@ -22,10 +22,8 @@
22 22
23static void ino_lnkfree(struct autofs_info *ino) 23static void ino_lnkfree(struct autofs_info *ino)
24{ 24{
25 if (ino->u.symlink) { 25 kfree(ino->u.symlink);
26 kfree(ino->u.symlink); 26 ino->u.symlink = NULL;
27 ino->u.symlink = NULL;
28 }
29} 27}
30 28
31struct autofs_info *autofs4_init_ino(struct autofs_info *ino, 29struct autofs_info *autofs4_init_ino(struct autofs_info *ino,
diff --git a/fs/autofs4/waitq.c b/fs/autofs4/waitq.c
index 3df86285a1c7..394ff36ef8f1 100644
--- a/fs/autofs4/waitq.c
+++ b/fs/autofs4/waitq.c
@@ -243,10 +243,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
243 if ( sbi->catatonic ) { 243 if ( sbi->catatonic ) {
244 /* We might have slept, so check again for catatonic mode */ 244 /* We might have slept, so check again for catatonic mode */
245 wq->status = -ENOENT; 245 wq->status = -ENOENT;
246 if ( wq->name ) { 246 kfree(wq->name);
247 kfree(wq->name); 247 wq->name = NULL;
248 wq->name = NULL;
249 }
250 } 248 }
251 249
252 if ( wq->name ) { 250 if ( wq->name ) {