Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87916
b: refs/heads/master
c: 6758f95
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 28, 2008
1 parent 03122fe commit 2560e90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c35038becad0adb0e25261fff66d85b1a6ddd0c2
refs/heads/master: 6758f953d05378d907a164c67934cd86183d9c88
11 changes: 2 additions & 9 deletions trunk/fs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,8 @@ static struct vfsmount *clone_mnt(struct vfsmount *old, struct dentry *root,
/* stick the duplicate mount on the same expiry list
* as the original if that was on one */
if (flag & CL_EXPIRE) {
spin_lock(&vfsmount_lock);
if (!list_empty(&old->mnt_expire))
list_add(&mnt->mnt_expire, &old->mnt_expire);
spin_unlock(&vfsmount_lock);
}
}
return mnt;
Expand Down Expand Up @@ -1127,11 +1125,9 @@ static noinline int do_move_mount(struct nameidata *nd, char *old_name)
if (err)
goto out1;

spin_lock(&vfsmount_lock);
/* if the mount is moved, it should no longer be expire
* automatically */
list_del_init(&old_nd.path.mnt->mnt_expire);
spin_unlock(&vfsmount_lock);
out1:
mutex_unlock(&nd->path.dentry->d_inode->i_mutex);
out:
Expand Down Expand Up @@ -1198,12 +1194,9 @@ int do_add_mount(struct vfsmount *newmnt, struct nameidata *nd,
if ((err = graft_tree(newmnt, nd)))
goto unlock;

if (fslist) {
/* add to the specified expiration list */
spin_lock(&vfsmount_lock);
if (fslist) /* add to the specified expiration list */
list_add_tail(&newmnt->mnt_expire, fslist);
spin_unlock(&vfsmount_lock);
}

up_write(&namespace_sem);
return 0;

Expand Down

0 comments on commit 2560e90

Please sign in to comment.