linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Nikita Danilov <NikitaDanilov@Yahoo.COM>
To: Linus Torvalds <Torvalds@Transmeta.COM>
Cc: Reiserfs developers mail-list <Reiserfs-Dev@Namesys.COM>,
	linux-kernel@vger.kernel.org
Subject: [PATCH]: reiserfs: D-clear-i_blocks.patch
Date: Thu, 2 Aug 2001 19:45:58 +0400	[thread overview]
Message-ID: <15209.30134.699801.417492@beta.namesys.com> (raw)

Hello, Linus,

This patch sets inode.i_blocks to zero on deletion of reiserfs
file. This in particular cures hard to believe bug when saving file in
EMACS caused top to loose sight of all processes:
 . reiserfs didn't properly cleared i_blocks when removing
   symlinks. Actually -7 was inserted into unsigned i_blocks field. This
   didn't usually hurt because file is being deleted;
 . inode is reused for procfs and neither get_new_inode() nor
   proc_read_inode() cleared i_blocks;
 . now procfs inode has huge i_blocks field;
 . top calls stat on it and libc wrapper returns EOVERFLOW, as i_blocks
   doesn't fit into user-level struct.
 . top sees nothing.
  
[lkml: please CC me, I am not subscribed.]

Nikita.
diff -rup linux-2.4.8-pre3/fs/reiserfs/inode.c linux-2.4.8-pre3.patched/fs/reiserfs/inode.c
--- linux-2.4.8-pre3/fs/reiserfs/inode.c	Wed Aug  1 17:21:10 2001
+++ linux-2.4.8-pre3.patched/fs/reiserfs/inode.c	Wed Aug  1 21:33:37 2001
@@ -55,6 +55,7 @@ void reiserfs_delete_inode (struct inode
 	;
     }
     clear_inode (inode); /* note this must go after the journal_end to prevent deadlock */
+    inode->i_blocks = 0;
     unlock_kernel() ;
 }
 

             reply	other threads:[~2001-08-02 15:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-02 15:45 Nikita Danilov [this message]
2001-08-02 17:26 ` [PATCH]: reiserfs: D-clear-i_blocks.patch Andreas Dilger
2001-08-02 17:45 ` Alexander Viro
2001-08-02 19:21   ` [reiserfs-dev] " Hans Reiser
2001-08-02 18:31 ` Nikita Danilov
2001-08-03 12:53   ` jlnance
2001-08-03 16:16   ` Nikita Danilov
2001-08-30 14:27 Nikita Danilov

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=15209.30134.699801.417492@beta.namesys.com \
    --to=nikitadanilov@yahoo.com \
    --cc=Reiserfs-Dev@Namesys.COM \
    --cc=Torvalds@Transmeta.COM \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).