diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-16 14:30:04 (GMT) |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-25 03:34:49 (GMT) |
commit | 87dc800be2499128efb3a6f059d75dc8e1e6d503 (patch) | |
tree | 6a5aa6bdc7dcb652f8435d4044021c7b9fe9bbc9 /fs/proc | |
parent | 12f38872224542c4683ab72a88394fc89b87ca32 (diff) | |
download | linux-fsl-qoriq-87dc800be2499128efb3a6f059d75dc8e1e6d503.tar.xz |
new helper: kfree_put_link()
duplicated to hell and back...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/self.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fs/proc/self.c b/fs/proc/self.c index 6b6a993..ffeb202 100644 --- a/fs/proc/self.c +++ b/fs/proc/self.c @@ -36,18 +36,10 @@ static void *proc_self_follow_link(struct dentry *dentry, struct nameidata *nd) return NULL; } -static void proc_self_put_link(struct dentry *dentry, struct nameidata *nd, - void *cookie) -{ - char *s = nd_get_link(nd); - if (!IS_ERR(s)) - kfree(s); -} - static const struct inode_operations proc_self_inode_operations = { .readlink = proc_self_readlink, .follow_link = proc_self_follow_link, - .put_link = proc_self_put_link, + .put_link = kfree_put_link, }; static unsigned self_inum; |