Skip to content

Commit

Permalink
proc: remove useless check on symlink removal
Browse files Browse the repository at this point in the history
proc symlinks always have valid ->data containing destination of symlink.  No
need to check it on removal -- proc_symlink() already done it.

Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Feb 8, 2008
1 parent 76df0c2 commit fd2cbe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/proc/generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ void free_proc_entry(struct proc_dir_entry *de)

release_inode_number(ino);

if (S_ISLNK(de->mode) && de->data)
if (S_ISLNK(de->mode))
kfree(de->data);
kfree(de);
}
Expand Down

0 comments on commit fd2cbe4

Please sign in to comment.