mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
new helper: kfree_put_link()
duplicated to hell and back... Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
12f3887222
commit
87dc800be2
8 changed files with 15 additions and 38 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue