Commit af8be4e4 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [PATCH] mnt_expire is protected by namespace_sem, no need for vfsmount_lock
  [PATCH] do shrink_submounts() for all fs types
  [PATCH] sanitize locking in mark_mounts_for_expiry() and shrink_submounts()
  [PATCH] count ghost references to vfsmounts
  [PATCH] reduce stack footprint in namespace.c
parents d478376c 6758f953
...@@ -573,7 +573,6 @@ extern const struct file_operations afs_mntpt_file_operations; ...@@ -573,7 +573,6 @@ extern const struct file_operations afs_mntpt_file_operations;
extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *); extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);
extern void afs_mntpt_kill_timer(void); extern void afs_mntpt_kill_timer(void);
extern void afs_umount_begin(struct vfsmount *, int);
/* /*
* proc.c * proc.c
......
...@@ -283,11 +283,3 @@ void afs_mntpt_kill_timer(void) ...@@ -283,11 +283,3 @@ void afs_mntpt_kill_timer(void)
cancel_delayed_work(&afs_mntpt_expiry_timer); cancel_delayed_work(&afs_mntpt_expiry_timer);
flush_scheduled_work(); flush_scheduled_work();
} }
/*
* begin unmount by attempting to remove all automounted mountpoints we added
*/
void afs_umount_begin(struct vfsmount *vfsmnt, int flags)
{
shrink_submounts(vfsmnt, &afs_vfsmounts);
}
...@@ -50,7 +50,6 @@ static const struct super_operations afs_super_ops = { ...@@ -50,7 +50,6 @@ static const struct super_operations afs_super_ops = {
.write_inode = afs_write_inode, .write_inode = afs_write_inode,
.destroy_inode = afs_destroy_inode, .destroy_inode = afs_destroy_inode,
.clear_inode = afs_clear_inode, .clear_inode = afs_clear_inode,
.umount_begin = afs_umount_begin,
.put_super = afs_put_super, .put_super = afs_put_super,
.show_options = generic_show_options, .show_options = generic_show_options,
}; };
......
...@@ -33,7 +33,6 @@ void dfs_shrink_umount_helper(struct vfsmount *vfsmnt) ...@@ -33,7 +33,6 @@ void dfs_shrink_umount_helper(struct vfsmount *vfsmnt)
{ {
mark_mounts_for_expiry(&cifs_dfs_automount_list); mark_mounts_for_expiry(&cifs_dfs_automount_list);
mark_mounts_for_expiry(&cifs_dfs_automount_list); mark_mounts_for_expiry(&cifs_dfs_automount_list);
shrink_submounts(vfsmnt, &cifs_dfs_automount_list);
} }
/** /**
......
This diff is collapsed.
...@@ -589,8 +589,6 @@ static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags) ...@@ -589,8 +589,6 @@ static void nfs_umount_begin(struct vfsmount *vfsmnt, int flags)
struct nfs_server *server = NFS_SB(vfsmnt->mnt_sb); struct nfs_server *server = NFS_SB(vfsmnt->mnt_sb);
struct rpc_clnt *rpc; struct rpc_clnt *rpc;
shrink_submounts(vfsmnt, &nfs_automount_list);
if (!(flags & MNT_FORCE)) if (!(flags & MNT_FORCE))
return; return;
/* -EIO all pending I/O */ /* -EIO all pending I/O */
......
...@@ -225,7 +225,7 @@ int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry, ...@@ -225,7 +225,7 @@ int propagate_mnt(struct vfsmount *dest_mnt, struct dentry *dest_dentry,
*/ */
static inline int do_refcount_check(struct vfsmount *mnt, int count) static inline int do_refcount_check(struct vfsmount *mnt, int count)
{ {
int mycount = atomic_read(&mnt->mnt_count); int mycount = atomic_read(&mnt->mnt_count) - mnt->mnt_ghosts;
return (mycount > count); return (mycount > count);
} }
......
...@@ -61,6 +61,7 @@ struct vfsmount { ...@@ -61,6 +61,7 @@ struct vfsmount {
atomic_t mnt_count; atomic_t mnt_count;
int mnt_expiry_mark; /* true if marked for expiry */ int mnt_expiry_mark; /* true if marked for expiry */
int mnt_pinned; int mnt_pinned;
int mnt_ghosts;
}; };
static inline struct vfsmount *mntget(struct vfsmount *mnt) static inline struct vfsmount *mntget(struct vfsmount *mnt)
...@@ -98,7 +99,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd, ...@@ -98,7 +99,6 @@ extern int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
int mnt_flags, struct list_head *fslist); int mnt_flags, struct list_head *fslist);
extern void mark_mounts_for_expiry(struct list_head *mounts); extern void mark_mounts_for_expiry(struct list_head *mounts);
extern void shrink_submounts(struct vfsmount *mountpoint, struct list_head *mounts);
extern spinlock_t vfsmount_lock; extern spinlock_t vfsmount_lock;
extern dev_t name_to_dev_t(char *name); extern dev_t name_to_dev_t(char *name);
......
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