mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
10
fs/libfs.c
10
fs/libfs.c
|
|
@ -10,6 +10,7 @@
|
|||
#include <linux/vfs.h>
|
||||
#include <linux/quotaops.h>
|
||||
#include <linux/mutex.h>
|
||||
#include <linux/namei.h>
|
||||
#include <linux/exportfs.h>
|
||||
#include <linux/writeback.h>
|
||||
#include <linux/buffer_head.h> /* sync_mapping_buffers */
|
||||
|
|
@ -992,3 +993,12 @@ int noop_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
|||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(noop_fsync);
|
||||
|
||||
void kfree_put_link(struct dentry *dentry, struct nameidata *nd,
|
||||
void *cookie)
|
||||
{
|
||||
char *s = nd_get_link(nd);
|
||||
if (!IS_ERR(s))
|
||||
kfree(s);
|
||||
}
|
||||
EXPORT_SYMBOL(kfree_put_link);
|
||||
|
|
|
|||
Loading…
Reference in a new issue