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/ecryptfs | |
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/ecryptfs')
-rw-r--r-- | fs/ecryptfs/inode.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c index 2ca62c40c6c2..0f9b66eaa767 100644 --- a/fs/ecryptfs/inode.c +++ b/fs/ecryptfs/inode.c | |||
@@ -703,16 +703,6 @@ out: | |||
703 | return NULL; | 703 | return NULL; |
704 | } | 704 | } |
705 | 705 | ||
706 | static void | ||
707 | ecryptfs_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr) | ||
708 | { | ||
709 | char *buf = nd_get_link(nd); | ||
710 | if (!IS_ERR(buf)) { | ||
711 | /* Free the char* */ | ||
712 | kfree(buf); | ||
713 | } | ||
714 | } | ||
715 | |||
716 | /** | 706 | /** |
717 | * upper_size_to_lower_size | 707 | * upper_size_to_lower_size |
718 | * @crypt_stat: Crypt_stat associated with file | 708 | * @crypt_stat: Crypt_stat associated with file |
@@ -1121,7 +1111,7 @@ out: | |||
1121 | const struct inode_operations ecryptfs_symlink_iops = { | 1111 | const struct inode_operations ecryptfs_symlink_iops = { |
1122 | .readlink = generic_readlink, | 1112 | .readlink = generic_readlink, |
1123 | .follow_link = ecryptfs_follow_link, | 1113 | .follow_link = ecryptfs_follow_link, |
1124 | .put_link = ecryptfs_put_link, | 1114 | .put_link = kfree_put_link, |
1125 | .permission = ecryptfs_permission, | 1115 | .permission = ecryptfs_permission, |
1126 | .setattr = ecryptfs_setattr, | 1116 | .setattr = ecryptfs_setattr, |
1127 | .getattr = ecryptfs_getattr_link, | 1117 | .getattr = ecryptfs_getattr_link, |