diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-24 07:21:56 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-04-25 09:23:25 -0400 |
commit | 42faad99658eed7ca8bd328ffa4bcb7d78c9bcca (patch) | |
tree | 8b57fb69d1922939c6ba13f512a0ae54a3a171ef /fs | |
parent | 78d31a3a87f84cf56004b7bc154831f2ee1186e8 (diff) |
[PATCH] restore sane ->umount_begin() API
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_super.c | 7 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 7 | ||||
-rw-r--r-- | fs/fuse/inode.c | 5 | ||||
-rw-r--r-- | fs/namespace.c | 9 | ||||
-rw-r--r-- | fs/nfs/super.c | 8 |
5 files changed, 15 insertions, 21 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 | ||
226 | static void | 226 | static void |
227 | v9fs_umount_begin(struct vfsmount *vfsmnt, int flags) | 227 | v9fs_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 | ||
235 | static const struct super_operations v9fs_super_ops = { | 234 | static 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 | ||
469 | static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags) | 469 | static 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 | ||
245 | static void fuse_umount_begin(struct vfsmount *vfsmnt, int flags) | 245 | static 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 | ||
251 | static void fuse_send_destroy(struct fuse_conn *fc) | 250 | static 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 | ||
201 | static void nfs_umount_begin(struct vfsmount *, int); | 201 | static void nfs_umount_begin(struct super_block *); |
202 | static int nfs_statfs(struct dentry *, struct kstatfs *); | 202 | static int nfs_statfs(struct dentry *, struct kstatfs *); |
203 | static int nfs_show_options(struct seq_file *, struct vfsmount *); | 203 | static int nfs_show_options(struct seq_file *, struct vfsmount *); |
204 | static int nfs_show_stats(struct seq_file *, struct vfsmount *); | 204 | static 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 | */ |
650 | static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags) | 650 | static 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)) |