diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-09-16 10:30:04 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-10-24 23:34:49 -0400 |
commit | 87dc800be2499128efb3a6f059d75dc8e1e6d503 (patch) | |
tree | 6a5aa6bdc7dcb652f8435d4044021c7b9fe9bbc9 /fs/libfs.c | |
parent | 12f38872224542c4683ab72a88394fc89b87ca32 (diff) |
new helper: kfree_put_link()
duplicated to hell and back...
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/libfs.c')
-rw-r--r-- | fs/libfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/fs/libfs.c b/fs/libfs.c index 828622a31d30..8c5018493154 100644 --- a/fs/libfs.c +++ b/fs/libfs.c | |||
@@ -10,6 +10,7 @@ | |||
10 | #include <linux/vfs.h> | 10 | #include <linux/vfs.h> |
11 | #include <linux/quotaops.h> | 11 | #include <linux/quotaops.h> |
12 | #include <linux/mutex.h> | 12 | #include <linux/mutex.h> |
13 | #include <linux/namei.h> | ||
13 | #include <linux/exportfs.h> | 14 | #include <linux/exportfs.h> |
14 | #include <linux/writeback.h> | 15 | #include <linux/writeback.h> |
15 | #include <linux/buffer_head.h> /* sync_mapping_buffers */ | 16 | #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) | |||
992 | return 0; | 993 | return 0; |
993 | } | 994 | } |
994 | EXPORT_SYMBOL(noop_fsync); | 995 | EXPORT_SYMBOL(noop_fsync); |
996 | |||
997 | void kfree_put_link(struct dentry *dentry, struct nameidata *nd, | ||
998 | void *cookie) | ||
999 | { | ||
1000 | char *s = nd_get_link(nd); | ||
1001 | if (!IS_ERR(s)) | ||
1002 | kfree(s); | ||
1003 | } | ||
1004 | EXPORT_SYMBOL(kfree_put_link); | ||