diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:34:18 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-11-13 01:34:18 -0500 |
commit | 9bc9ccd7db1c9f043f75380b5a5b94912046a60e (patch) | |
tree | dd0a1b3396ae9414f668b0110cc39d11268ad3ed /fs/cifs | |
parent | f0230294271f511b41797305b685365a9e569a09 (diff) | |
parent | bdd3536618443809d18868563eeafa63b9d29603 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs updates from Al Viro:
"All kinds of stuff this time around; some more notable parts:
- RCU'd vfsmounts handling
- new primitives for coredump handling
- files_lock is gone
- Bruce's delegations handling series
- exportfs fixes
plus misc stuff all over the place"
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (101 commits)
ecryptfs: ->f_op is never NULL
locks: break delegations on any attribute modification
locks: break delegations on link
locks: break delegations on rename
locks: helper functions for delegation breaking
locks: break delegations on unlink
namei: minor vfs_unlink cleanup
locks: implement delegations
locks: introduce new FL_DELEG lock flag
vfs: take i_mutex on renamed file
vfs: rename I_MUTEX_QUOTA now that it's not used for quotas
vfs: don't use PARENT/CHILD lock classes for non-directories
vfs: pull ext4's double-i_mutex-locking into common code
exportfs: fix quadratic behavior in filehandle lookup
exportfs: better variable name
exportfs: move most of reconnect_path to helper function
exportfs: eliminate unused "noprogress" counter
exportfs: stop retrying once we race with rename/remove
exportfs: clear DISCONNECTED on all parents sooner
exportfs: more detailed comment for path_reconnect
...
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 | } | ||