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/cifs | |
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/cifs')
-rw-r--r-- | fs/cifs/cifsfs.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/link.c | 7 |
3 files changed, 1 insertions, 10 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index a16b4e58bcc6..801975c34cf9 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -860,7 +860,7 @@ const struct inode_operations cifs_file_inode_ops = { | |||
860 | const struct inode_operations cifs_symlink_inode_ops = { | 860 | const struct inode_operations cifs_symlink_inode_ops = { |
861 | .readlink = generic_readlink, | 861 | .readlink = generic_readlink, |
862 | .follow_link = cifs_follow_link, | 862 | .follow_link = cifs_follow_link, |
863 | .put_link = cifs_put_link, | 863 | .put_link = kfree_put_link, |
864 | .permission = cifs_permission, | 864 | .permission = cifs_permission, |
865 | /* BB add the following two eventually */ | 865 | /* BB add the following two eventually */ |
866 | /* revalidate: cifs_revalidate, | 866 | /* revalidate: cifs_revalidate, |
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h index 6d0b07217ac9..26a754f49ba1 100644 --- a/fs/cifs/cifsfs.h +++ b/fs/cifs/cifsfs.h | |||
@@ -115,8 +115,6 @@ extern struct vfsmount *cifs_dfs_d_automount(struct path *path); | |||
115 | 115 | ||
116 | /* Functions related to symlinks */ | 116 | /* Functions related to symlinks */ |
117 | extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd); | 117 | extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd); |
118 | extern void cifs_put_link(struct dentry *direntry, | ||
119 | struct nameidata *nd, void *); | ||
120 | extern int cifs_readlink(struct dentry *direntry, char __user *buffer, | 118 | extern int cifs_readlink(struct dentry *direntry, char __user *buffer, |
121 | int buflen); | 119 | int buflen); |
122 | extern int cifs_symlink(struct inode *inode, struct dentry *direntry, | 120 | extern int cifs_symlink(struct inode *inode, struct dentry *direntry, |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 7e36ceba0c7a..cc0234710ddb 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -621,10 +621,3 @@ symlink_exit: | |||
621 | free_xid(xid); | 621 | free_xid(xid); |
622 | return rc; | 622 | return rc; |
623 | } | 623 | } |
624 | |||
625 | void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie) | ||
626 | { | ||
627 | char *p = nd_get_link(nd); | ||
628 | if (!IS_ERR(p)) | ||
629 | kfree(p); | ||
630 | } | ||