aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-04-24 07:21:56 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-04-25 09:23:25 -0400
commit42faad99658eed7ca8bd328ffa4bcb7d78c9bcca (patch)
tree8b57fb69d1922939c6ba13f512a0ae54a3a171ef
parent78d31a3a87f84cf56004b7bc154831f2ee1186e8 (diff)
[PATCH] restore sane ->umount_begin() API
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--fs/9p/vfs_super.c7
-rw-r--r--fs/cifs/cifsfs.c7
-rw-r--r--fs/fuse/inode.c5
-rw-r--r--fs/namespace.c9
-rw-r--r--fs/nfs/super.c8
-rw-r--r--include/linux/fs.h2
6 files changed, 16 insertions, 22 deletions
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 678c02f1ae23..a452ac67fc94 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -224,12 +224,11 @@ static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
224} 224}
225 225
226static void 226static void
227v9fs_umount_begin(struct vfsmount *vfsmnt, int flags) 227v9fs_umount_begin(struct super_block *sb)
228{ 228{
229 struct v9fs_session_info *v9ses = vfsmnt->mnt_sb->s_fs_info; 229 struct v9fs_session_info *v9ses = sb->s_fs_info;
230 230
231 if (flags & MNT_FORCE) 231 v9fs_session_cancel(v9ses);
232 v9fs_session_cancel(v9ses);
233} 232}
234 233
235static const struct super_operations v9fs_super_ops = { 234static const struct super_operations v9fs_super_ops = {
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index dbb2cd678bf5..39c2cbdface7 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -466,14 +466,11 @@ static struct quotactl_ops cifs_quotactl_ops = {
466}; 466};
467#endif 467#endif
468 468
469static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags) 469static void cifs_umount_begin(struct super_block *sb)
470{ 470{
471 struct cifs_sb_info *cifs_sb; 471 struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
472 struct cifsTconInfo *tcon; 472 struct cifsTconInfo *tcon;
473 473
474 if (!(flags & MNT_FORCE))
475 return;
476 cifs_sb = CIFS_SB(vfsmnt->mnt_sb);
477 if (cifs_sb == NULL) 474 if (cifs_sb == NULL)
478 return; 475 return;
479 476
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c
index 033f7bdd47e8..4df34da2284a 100644
--- a/fs/fuse/inode.c
+++ b/fs/fuse/inode.c
@@ -242,10 +242,9 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
242 return inode; 242 return inode;
243} 243}
244 244
245static void fuse_umount_begin(struct vfsmount *vfsmnt, int flags) 245static void fuse_umount_begin(struct super_block *sb)
246{ 246{
247 if (flags & MNT_FORCE) 247 fuse_abort_conn(get_fuse_conn_super(sb));
248 fuse_abort_conn(get_fuse_conn_super(vfsmnt->mnt_sb));
249} 248}
250 249
251static void fuse_send_destroy(struct fuse_conn *fc) 250static void fuse_send_destroy(struct fuse_conn *fc)
diff --git a/fs/namespace.c b/fs/namespace.c
index 0505fb61aa74..f48f98110c30 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1061,10 +1061,11 @@ static int do_umount(struct vfsmount *mnt, int flags)
1061 * about for the moment. 1061 * about for the moment.
1062 */ 1062 */
1063 1063
1064 lock_kernel(); 1064 if (flags & MNT_FORCE && sb->s_op->umount_begin) {
1065 if (sb->s_op->umount_begin) 1065 lock_kernel();
1066 sb->s_op->umount_begin(mnt, flags); 1066 sb->s_op->umount_begin(sb);
1067 unlock_kernel(); 1067 unlock_kernel();
1068 }
1068 1069
1069 /* 1070 /*
1070 * No sense to grab the lock for this test, but test itself looks 1071 * No sense to grab the lock for this test, but test itself looks
diff --git a/fs/nfs/super.c b/fs/nfs/super.c
index 20a1cb1810fe..fa220dc74609 100644
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -198,7 +198,7 @@ static match_table_t nfs_secflavor_tokens = {
198}; 198};
199 199
200 200
201static void nfs_umount_begin(struct vfsmount *, int); 201static void nfs_umount_begin(struct super_block *);
202static int nfs_statfs(struct dentry *, struct kstatfs *); 202static int nfs_statfs(struct dentry *, struct kstatfs *);
203static int nfs_show_options(struct seq_file *, struct vfsmount *); 203static int nfs_show_options(struct seq_file *, struct vfsmount *);
204static int nfs_show_stats(struct seq_file *, struct vfsmount *); 204static int nfs_show_stats(struct seq_file *, struct vfsmount *);
@@ -647,13 +647,11 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
647 * Begin unmount by attempting to remove all automounted mountpoints we added 647 * Begin unmount by attempting to remove all automounted mountpoints we added
648 * in response to xdev traversals and referrals 648 * in response to xdev traversals and referrals
649 */ 649 */
650static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags) 650static void nfs_umount_begin(struct super_block *sb)
651{ 651{
652 struct nfs_server *server = NFS_SB(vfsmnt->mnt_sb); 652 struct nfs_server *server = NFS_SB(sb);
653 struct rpc_clnt *rpc; 653 struct rpc_clnt *rpc;
654 654
655 if (!(flags & MNT_FORCE))
656 return;
657 /* -EIO all pending I/O */ 655 /* -EIO all pending I/O */
658 rpc = server->client_acl; 656 rpc = server->client_acl;
659 if (!IS_ERR(rpc)) 657 if (!IS_ERR(rpc))
diff --git a/include/linux/fs.h b/include/linux/fs.h
index cc2be2cf7d41..ad41d0bbcb4d 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1308,7 +1308,7 @@ struct super_operations {
1308 int (*statfs) (struct dentry *, struct kstatfs *); 1308 int (*statfs) (struct dentry *, struct kstatfs *);
1309 int (*remount_fs) (struct super_block *, int *, char *); 1309 int (*remount_fs) (struct super_block *, int *, char *);
1310 void (*clear_inode) (struct inode *); 1310 void (*clear_inode) (struct inode *);
1311 void (*umount_begin) (struct vfsmount *, int); 1311 void (*umount_begin) (struct super_block *);
1312 1312
1313 int (*show_options)(struct seq_file *, struct vfsmount *); 1313 int (*show_options)(struct seq_file *, struct vfsmount *);
1314 int (*show_stats)(struct seq_file *, struct vfsmount *); 1314 int (*show_stats)(struct seq_file *, struct vfsmount *);