2.5.46: switch quota and BSD acct off for busy fs?

2.5.46: switch quota and BSD acct off for busy fs?

Post by Olaf Dietsch » Sat, 09 Nov 2002 08:30:09



do_umount() does DQUOT_OFF() and acct_auto_close() before actually
unmounting the fs. I guess, this is wrong, as long as the fs is busy.

Possible fix below. Comments?

Regards, Olaf.

--- a/fs/namespace.c    Sat Oct  5 18:45:36 2002

        down_write(&current->namespace->sem);
        spin_lock(&dcache_lock);

+       retval = -EBUSY;
+       if (atomic_read(&mnt->mnt_count) == 2 || flags & MNT_DETACH) {
        if (atomic_read(&sb->s_active) == 1) {
                /* last instance - try to be smart */

                security_ops->sb_umount_close(mnt);
                spin_lock(&dcache_lock);
        }
-       retval = -EBUSY;
-       if (atomic_read(&mnt->mnt_count) == 2 || flags & MNT_DETACH) {
                if (!list_empty(&mnt->mnt_list))
                        umount_tree(mnt);
                retval = 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in

More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/