Commit 42faad99 authored by Al Viro's avatar Al Viro

[PATCH] restore sane ->umount_begin() API

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 78d31a3a
...@@ -224,11 +224,10 @@ static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt) ...@@ -224,11 +224,10 @@ static int v9fs_show_options(struct seq_file *m, struct vfsmount *mnt)
} }
static void static void
v9fs_umount_begin(struct vfsmount *vfsmnt, int flags) v9fs_umount_begin(struct super_block *sb)
{ {
struct v9fs_session_info *v9ses = vfsmnt->mnt_sb->s_fs_info; struct v9fs_session_info *v9ses = sb->s_fs_info;
if (flags & MNT_FORCE)
v9fs_session_cancel(v9ses); v9fs_session_cancel(v9ses);
} }
......
...@@ -466,14 +466,11 @@ static struct quotactl_ops cifs_quotactl_ops = { ...@@ -466,14 +466,11 @@ static struct quotactl_ops cifs_quotactl_ops = {
}; };
#endif #endif
static void cifs_umount_begin(struct vfsmount *vfsmnt, int flags) static void cifs_umount_begin(struct super_block *sb)
{ {
struct cifs_sb_info *cifs_sb; struct cifs_sb_info *cifs_sb = CIFS_SB(sb);
struct cifsTconInfo *tcon; struct cifsTconInfo *tcon;
if (!(flags & MNT_FORCE))
return;
cifs_sb = CIFS_SB(vfsmnt->mnt_sb);
if (cifs_sb == NULL) if (cifs_sb == NULL)
return; return;
......
...@@ -242,10 +242,9 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, ...@@ -242,10 +242,9 @@ struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid,
return inode; return inode;
} }
static void fuse_umount_begin(struct vfsmount *vfsmnt, int flags) static void fuse_umount_begin(struct super_block *sb)
{ {
if (flags & MNT_FORCE) fuse_abort_conn(get_fuse_conn_super(sb));
fuse_abort_conn(get_fuse_conn_super(vfsmnt->mnt_sb));
} }
static void fuse_send_destroy(struct fuse_conn *fc) static void fuse_send_destroy(struct fuse_conn *fc)
......
...@@ -1061,10 +1061,11 @@ static int do_umount(struct vfsmount *mnt, int flags) ...@@ -1061,10 +1061,11 @@ static int do_umount(struct vfsmount *mnt, int flags)
* about for the moment. * about for the moment.
*/ */
if (flags & MNT_FORCE && sb->s_op->umount_begin) {
lock_kernel(); lock_kernel();
if (sb->s_op->umount_begin) sb->s_op->umount_begin(sb);
sb->s_op->umount_begin(mnt, flags);
unlock_kernel(); unlock_kernel();
}
/* /*
* No sense to grab the lock for this test, but test itself looks * No sense to grab the lock for this test, but test itself looks
......
...@@ -198,7 +198,7 @@ static match_table_t nfs_secflavor_tokens = { ...@@ -198,7 +198,7 @@ static match_table_t nfs_secflavor_tokens = {
}; };
static void nfs_umount_begin(struct vfsmount *, int); static void nfs_umount_begin(struct super_block *);
static int nfs_statfs(struct dentry *, struct kstatfs *); static int nfs_statfs(struct dentry *, struct kstatfs *);
static int nfs_show_options(struct seq_file *, struct vfsmount *); static int nfs_show_options(struct seq_file *, struct vfsmount *);
static int nfs_show_stats(struct seq_file *, struct vfsmount *); 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,13 +647,11 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
* Begin unmount by attempting to remove all automounted mountpoints we added * Begin unmount by attempting to remove all automounted mountpoints we added
* in response to xdev traversals and referrals * in response to xdev traversals and referrals
*/ */
static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags) static void nfs_umount_begin(struct super_block *sb)
{ {
struct nfs_server *server = NFS_SB(vfsmnt->mnt_sb); struct nfs_server *server = NFS_SB(sb);
struct rpc_clnt *rpc; struct rpc_clnt *rpc;
if (!(flags & MNT_FORCE))
return;
/* -EIO all pending I/O */ /* -EIO all pending I/O */
rpc = server->client_acl; rpc = server->client_acl;
if (!IS_ERR(rpc)) if (!IS_ERR(rpc))
......
...@@ -1308,7 +1308,7 @@ struct super_operations { ...@@ -1308,7 +1308,7 @@ struct super_operations {
int (*statfs) (struct dentry *, struct kstatfs *); int (*statfs) (struct dentry *, struct kstatfs *);
int (*remount_fs) (struct super_block *, int *, char *); int (*remount_fs) (struct super_block *, int *, char *);
void (*clear_inode) (struct inode *); void (*clear_inode) (struct inode *);
void (*umount_begin) (struct vfsmount *, int); void (*umount_begin) (struct super_block *);
int (*show_options)(struct seq_file *, struct vfsmount *); int (*show_options)(struct seq_file *, struct vfsmount *);
int (*show_stats)(struct seq_file *, struct vfsmount *); int (*show_stats)(struct seq_file *, struct vfsmount *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment