File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -795,15 +795,17 @@ static void __touch_mnt_namespace(struct mnt_namespace *ns)
795
795
/*
796
796
* vfsmount lock must be held for write
797
797
*/
798
- static void unhash_mnt (struct mount * mnt )
798
+ static struct mountpoint * unhash_mnt (struct mount * mnt )
799
799
{
800
+ struct mountpoint * mp ;
800
801
mnt -> mnt_parent = mnt ;
801
802
mnt -> mnt_mountpoint = mnt -> mnt .mnt_root ;
802
803
list_del_init (& mnt -> mnt_child );
803
804
hlist_del_init_rcu (& mnt -> mnt_hash );
804
805
hlist_del_init (& mnt -> mnt_mp_list );
805
- put_mountpoint ( mnt -> mnt_mp ) ;
806
+ mp = mnt -> mnt_mp ;
806
807
mnt -> mnt_mp = NULL ;
808
+ return mp ;
807
809
}
808
810
809
811
/*
@@ -813,7 +815,7 @@ static void detach_mnt(struct mount *mnt, struct path *old_path)
813
815
{
814
816
old_path -> dentry = mnt -> mnt_mountpoint ;
815
817
old_path -> mnt = & mnt -> mnt_parent -> mnt ;
816
- unhash_mnt (mnt );
818
+ put_mountpoint ( unhash_mnt (mnt ) );
817
819
}
818
820
819
821
/*
@@ -823,7 +825,7 @@ static void umount_mnt(struct mount *mnt)
823
825
{
824
826
/* old mountpoint will be dropped when we can do that */
825
827
mnt -> mnt_ex_mountpoint = mnt -> mnt_mountpoint ;
826
- unhash_mnt (mnt );
828
+ put_mountpoint ( unhash_mnt (mnt ) );
827
829
}
828
830
829
831
/*
You can’t perform that action at this time.
0 commit comments