diff options
Diffstat (limited to 'fs/cifs')
-rw-r--r-- | fs/cifs/cifs_fs_sb.h | 1 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 2 | ||||
-rw-r--r-- | fs/cifs/cifsfs.h | 2 | ||||
-rw-r--r-- | fs/cifs/connect.c | 10 | ||||
-rw-r--r-- | fs/cifs/link.c | 7 |
5 files changed, 10 insertions, 12 deletions
diff --git a/fs/cifs/cifs_fs_sb.h b/fs/cifs/cifs_fs_sb.h index 37e4a72a7d1c..9409fa10bd5c 100644 --- a/fs/cifs/cifs_fs_sb.h +++ b/fs/cifs/cifs_fs_sb.h | |||
@@ -65,5 +65,6 @@ struct cifs_sb_info { | |||
65 | char *mountdata; /* options received at mount time or via DFS refs */ | 65 | char *mountdata; /* options received at mount time or via DFS refs */ |
66 | struct backing_dev_info bdi; | 66 | struct backing_dev_info bdi; |
67 | struct delayed_work prune_tlinks; | 67 | struct delayed_work prune_tlinks; |
68 | struct rcu_head rcu; | ||
68 | }; | 69 | }; |
69 | #endif /* _CIFS_FS_SB_H */ | 70 | #endif /* _CIFS_FS_SB_H */ |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 77fc5e181077..849f6132b327 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -862,7 +862,7 @@ const struct inode_operations cifs_file_inode_ops = { | |||
862 | const struct inode_operations cifs_symlink_inode_ops = { | 862 | const struct inode_operations cifs_symlink_inode_ops = { |
863 | .readlink = generic_readlink, | 863 | .readlink = generic_readlink, |
864 | .follow_link = cifs_follow_link, | 864 | .follow_link = cifs_follow_link, |
865 | .put_link = cifs_put_link, | 865 | .put_link = kfree_put_link, |
866 | .permission = cifs_permission, | 866 | .permission = cifs_permission, |
867 | /* BB add the following two eventually */ | 867 | /* BB add the following two eventually */ |
868 | /* revalidate: cifs_revalidate, | 868 | /* 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/connect.c b/fs/cifs/connect.c index 62a55147400a..8813ff776ba3 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
@@ -3770,6 +3770,13 @@ CIFSTCon(const unsigned int xid, struct cifs_ses *ses, | |||
3770 | return rc; | 3770 | return rc; |
3771 | } | 3771 | } |
3772 | 3772 | ||
3773 | static void delayed_free(struct rcu_head *p) | ||
3774 | { | ||
3775 | struct cifs_sb_info *sbi = container_of(p, struct cifs_sb_info, rcu); | ||
3776 | unload_nls(sbi->local_nls); | ||
3777 | kfree(sbi); | ||
3778 | } | ||
3779 | |||
3773 | void | 3780 | void |
3774 | cifs_umount(struct cifs_sb_info *cifs_sb) | 3781 | cifs_umount(struct cifs_sb_info *cifs_sb) |
3775 | { | 3782 | { |
@@ -3794,8 +3801,7 @@ cifs_umount(struct cifs_sb_info *cifs_sb) | |||
3794 | 3801 | ||
3795 | bdi_destroy(&cifs_sb->bdi); | 3802 | bdi_destroy(&cifs_sb->bdi); |
3796 | kfree(cifs_sb->mountdata); | 3803 | kfree(cifs_sb->mountdata); |
3797 | unload_nls(cifs_sb->local_nls); | 3804 | call_rcu(&cifs_sb->rcu, delayed_free); |
3798 | kfree(cifs_sb); | ||
3799 | } | 3805 | } |
3800 | 3806 | ||
3801 | int | 3807 | int |
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 | } | ||