The branch main has been updated by kib:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=1d9f3a37eb20305bfdd67788cfac5c51938226a4

commit 1d9f3a37eb20305bfdd67788cfac5c51938226a4
Author:     Konstantin Belousov <[email protected]>
AuthorDate: 2023-01-06 16:38:44 +0000
Commit:     Konstantin Belousov <[email protected]>
CommitDate: 2023-01-14 18:28:11 +0000

    Stop cleaning MNT_LOCAL on unmount
    
    There is no point in clearing just this flag.  Flags are reset on the
    struct mount re-allocation for reuse anyway.
    
    Reviewed by:    mckusick
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential revision:  https://reviews.freebsd.org/D37966
---
 sys/fs/cd9660/cd9660_vfsops.c   | 3 ---
 sys/fs/ext2fs/ext2_vfsops.c     | 3 ---
 sys/fs/msdosfs/msdosfs_vfsops.c | 3 ---
 sys/fs/smbfs/smbfs_vfsops.c     | 3 ---
 sys/fs/tmpfs/tmpfs_vfsops.c     | 4 ----
 sys/fs/udf/udf_vfsops.c         | 4 ----
 sys/ufs/ffs/ffs_vfsops.c        | 3 ---
 7 files changed, 23 deletions(-)

diff --git a/sys/fs/cd9660/cd9660_vfsops.c b/sys/fs/cd9660/cd9660_vfsops.c
index c8ac6bb1be2e..6d5551c69312 100644
--- a/sys/fs/cd9660/cd9660_vfsops.c
+++ b/sys/fs/cd9660/cd9660_vfsops.c
@@ -523,9 +523,6 @@ cd9660_unmount(struct mount *mp, int mntflags)
        dev_rel(isomp->im_dev);
        free(isomp, M_ISOFSMNT);
        mp->mnt_data = NULL;
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
        return (error);
 }
 
diff --git a/sys/fs/ext2fs/ext2_vfsops.c b/sys/fs/ext2fs/ext2_vfsops.c
index 2aff8c701af0..9f76dc63300d 100644
--- a/sys/fs/ext2fs/ext2_vfsops.c
+++ b/sys/fs/ext2fs/ext2_vfsops.c
@@ -1047,9 +1047,6 @@ ext2_unmount(struct mount *mp, int mntflags)
        free(fs, M_EXT2MNT);
        free(ump, M_EXT2MNT);
        mp->mnt_data = NULL;
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
        return (error);
 }
 
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index b6f8c29d9162..37e5c4d4500a 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -870,9 +870,6 @@ msdosfs_unmount(struct mount *mp, int mntflags)
        lockdestroy(&pmp->pm_checkpath_lock);
        free(pmp, M_MSDOSFSMNT);
        mp->mnt_data = NULL;
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
        return (error);
 }
 
diff --git a/sys/fs/smbfs/smbfs_vfsops.c b/sys/fs/smbfs/smbfs_vfsops.c
index a1ae565c6341..9d6fa9274e36 100644
--- a/sys/fs/smbfs/smbfs_vfsops.c
+++ b/sys/fs/smbfs/smbfs_vfsops.c
@@ -299,9 +299,6 @@ smbfs_unmount(struct mount *mp, int mntflags)
        mp->mnt_data = NULL;
        SMB_UNLOCK();
        free(smp, M_SMBFSDATA);
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
 out:
        smbfs_free_scred(scred);
        return error;
diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c
index de207242b574..a8382872aa2f 100644
--- a/sys/fs/tmpfs/tmpfs_vfsops.c
+++ b/sys/fs/tmpfs/tmpfs_vfsops.c
@@ -536,10 +536,6 @@ tmpfs_unmount(struct mount *mp, int mntflags)
        tmpfs_free_tmp(tmp);
        vfs_write_resume(mp, VR_START_WRITE);
 
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
-
        return (0);
 }
 
diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c
index de943229e3a8..057bb3f6587b 100644
--- a/sys/fs/udf/udf_vfsops.c
+++ b/sys/fs/udf/udf_vfsops.c
@@ -542,10 +542,6 @@ udf_unmount(struct mount *mp, int mntflags)
        free(udfmp, M_UDFMOUNT);
 
        mp->mnt_data = NULL;
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
-
        return (0);
 }
 
diff --git a/sys/ufs/ffs/ffs_vfsops.c b/sys/ufs/ffs/ffs_vfsops.c
index ad095874c06d..560708883cca 100644
--- a/sys/ufs/ffs/ffs_vfsops.c
+++ b/sys/ufs/ffs/ffs_vfsops.c
@@ -1448,9 +1448,6 @@ ffs_unmount(struct mount *mp, int mntflags)
        free(fs, M_UFSMNT);
        free(ump, M_UFSMNT);
        mp->mnt_data = NULL;
-       MNT_ILOCK(mp);
-       mp->mnt_flag &= ~MNT_LOCAL;
-       MNT_IUNLOCK(mp);
        if (td->td_su == mp) {
                td->td_su = NULL;
                vfs_rel(mp);

Reply via email to