From: Phil Sorber <aafes@psu.edu>
To: Alexander Viro <viro@math.psu.edu>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Linus Torvalds <torvalds@transmeta.com>,
Marcelo Tosatti <marcelo@conectiva.com.br>
Subject: Re: [PATCH][CFT] Re: 2.4.15-pre9 breakage (inode.c)
Date: 23 Nov 2001 17:35:34 -0500 [thread overview]
Message-ID: <1006554935.511.11.camel@praetorian> (raw)
In-Reply-To: <Pine.GSO.4.21.0111231701440.2422-100000@weyl.math.psu.edu>
In-Reply-To: <Pine.GSO.4.21.0111231701440.2422-100000@weyl.math.psu.edu>
[-- Attachment #1: Type: text/plain, Size: 3595 bytes --]
does this affect non-ext2 systems? the only complaints i have seen on
here were related to ext2, i am running reiserfs, should i have to be
worried as well?
On Fri, 2001-11-23 at 17:06, Alexander Viro wrote:
>
>
> On Fri, 23 Nov 2001, Alexander Viro wrote:
>
> > Untested fix follows. And please, pass the brown paperbag... ;-/
>
> ... and now for something that really builds:
>
> diff -urN S15/fs/inode.c S15-fix/fs/inode.c
> --- S15/fs/inode.c Fri Nov 23 06:45:43 2001
> +++ S15-fix/fs/inode.c Fri Nov 23 17:04:05 2001
> @@ -1065,24 +1065,27 @@
> if (inode->i_state != I_CLEAR)
> BUG();
> } else {
> - if (!list_empty(&inode->i_hash) && sb && sb->s_root) {
> + if (!list_empty(&inode->i_hash)) {
> if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
> list_del(&inode->i_list);
> list_add(&inode->i_list, &inode_unused);
> }
> inodes_stat.nr_unused++;
> spin_unlock(&inode_lock);
> - return;
> - } else {
> - list_del_init(&inode->i_list);
> + if (!sb || sb->s_flags & MS_ACTIVE)
> + return;
> + write_inode_now(inode, 1);
> + spin_lock(&inode_lock);
> + inodes_stat.nr_unused--;
> list_del_init(&inode->i_hash);
> - inode->i_state|=I_FREEING;
> - inodes_stat.nr_inodes--;
> - spin_unlock(&inode_lock);
> - if (inode->i_data.nrpages)
> - truncate_inode_pages(&inode->i_data, 0);
> - clear_inode(inode);
> }
> + list_del_init(&inode->i_list);
> + inode->i_state|=I_FREEING;
> + inodes_stat.nr_inodes--;
> + spin_unlock(&inode_lock);
> + if (inode->i_data.nrpages)
> + truncate_inode_pages(&inode->i_data, 0);
> + clear_inode(inode);
> }
> destroy_inode(inode);
> }
> diff -urN S15/fs/super.c S15-fix/fs/super.c
> --- S15/fs/super.c Fri Nov 23 06:45:43 2001
> +++ S15-fix/fs/super.c Fri Nov 23 16:56:50 2001
> @@ -462,6 +462,7 @@
> lock_super(s);
> if (!type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
> goto out_fail;
> + s->s_flags |= MS_ACTIVE;
> unlock_super(s);
> /* tell bdcache that we are going to keep this one */
> if (bdev)
> @@ -614,6 +615,7 @@
> lock_super(s);
> if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
> goto out_fail;
> + s->s_flags |= MS_ACTIVE;
> unlock_super(s);
> get_filesystem(fs_type);
> path_release(&nd);
> @@ -695,6 +697,7 @@
> lock_super(s);
> if (!fs_type->read_super(s, data, flags & MS_VERBOSE ? 1 : 0))
> goto out_fail;
> + s->s_flags |= MS_ACTIVE;
> unlock_super(s);
> get_filesystem(fs_type);
> return s;
> @@ -739,6 +742,7 @@
> dput(root);
> fsync_super(sb);
> lock_super(sb);
> + sb->s_flags &= ~MS_ACTIVE;
> invalidate_inodes(sb); /* bad name - it should be evict_inodes() */
> if (sop) {
> if (sop->write_super && sb->s_dirt)
> diff -urN S15/include/linux/fs.h S15-fix/include/linux/fs.h
> --- S15/include/linux/fs.h Fri Nov 23 06:45:44 2001
> +++ S15-fix/include/linux/fs.h Fri Nov 23 17:01:18 2001
> @@ -110,6 +110,7 @@
> #define MS_BIND 4096
> #define MS_REC 16384
> #define MS_VERBOSE 32768
> +#define MS_ACTIVE (1<<30)
> #define MS_NOUSER (1<<31)
>
> /*
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
--
Phil Sorber
AIM: PSUdaemon
IRC: irc.openprojects.net #psulug PSUdaemon
GnuPG: keyserver - pgp.mit.edu
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next prev parent reply other threads:[~2001-11-23 22:35 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-11-23 21:22 2.4.15-pre9 breakage (inode.c) Alexander Viro
2001-11-23 21:42 ` Jeff Merkey
2001-11-23 21:51 ` [PATCH][CFT] " Alexander Viro
2001-11-23 22:06 ` Alexander Viro
2001-11-23 22:34 ` Russell King
2001-11-23 22:35 ` Phil Sorber [this message]
2001-11-23 22:49 ` Alexander Viro
2001-11-23 23:05 ` Andreas Dilger
2001-11-23 23:35 ` Russell King
2001-11-24 1:48 ` Linus Torvalds
2001-11-24 5:47 ` Andrea Arcangeli
2001-11-24 5:55 ` Linus Torvalds
2001-11-24 6:08 ` Alexander Viro
2001-11-24 6:26 ` Andrea Arcangeli
2001-11-24 6:31 ` Alexander Viro
2001-11-24 6:37 ` Alexander Viro
2001-11-24 6:50 ` Andrea Arcangeli
2001-11-24 6:58 ` Alexander Viro
2001-11-24 7:01 ` Andrea Arcangeli
2001-11-24 7:06 ` Alexander Viro
2001-11-24 7:12 ` Andrea Arcangeli
2001-11-24 7:30 ` Alexander Viro
2001-11-24 7:44 ` Andrea Arcangeli
2001-11-24 8:05 ` Alexander Viro
2001-11-24 8:21 ` Andrea Arcangeli
2001-11-24 8:38 ` Alexander Viro
2001-11-24 9:38 ` Andrea Arcangeli
2001-11-24 9:56 ` Alexander Viro
2001-11-24 10:25 ` Andrea Arcangeli
2001-11-24 6:44 ` Andrea Arcangeli
2001-11-24 6:51 ` Alexander Viro
2001-11-24 9:00 ` Russell King
2001-11-24 10:20 ` Christian Bornträger
2001-11-24 6:04 ` Alexander Viro
2001-11-24 6:20 ` Andrea Arcangeli
2001-11-24 6:29 ` Alexander Viro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1006554935.511.11.camel@praetorian \
--to=aafes@psu.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=torvalds@transmeta.com \
--cc=viro@math.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.