linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Carsten Otte <cotte@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [BUG] -mm: mm-only-i_size_write-debugging.patch
Date: Fri, 20 Oct 2006 14:58:53 +0200	[thread overview]
Message-ID: <4538C80D.6060504@de.ibm.com> (raw)

I think that the warning introduced by the patch 
mm-only-i_size_write-debugging.patch is incorrect in the case I ran into:
[in fs/inode.c]
+void i_size_write(struct inode *inode, loff_t i_size)
+{
+       WARN_ON_ONCE(!mutex_is_locked(&inode->i_mutex));

I can reprocude triggering this warning by copying files to a 
read+write mounted ext2 filesystem (without -o xip).

The stack chain looks like this:
BUG: warning at fs/inode.c:1389/i_size_write()
Call Trace:
([<0000000000103502>] show_trace+0x166/0x16c)
  [<00000000001035ce>] show_stack+0xc6/0xf8
  [<000000000010362e>] dump_stack+0x2e/0x3c
  [<00000000001b6484>] i_size_write+0x78/0x84
  [<00000000001ca5ce>] generic_commit_write+0x62/0x84
  [<00000000002296ec>] ext2_commit_chunk+0x64/0xbc
  [<0000000000229b70>] ext2_make_empty+0x1e8/0x21c
  [<000000000022eeb2>] ext2_mkdir+0xea/0x19c
  [<00000000001a66d8>] vfs_mkdir+0x10c/0x1c4
  [<00000000001aa3ac>] sys_mkdirat+0xc8/0x120
  [<00000000001aa436>] sys_mkdir+0x32/0x40
  [<000000000010dc18>] sysc_tracego+0xe/0x14
  [<000002000012a3fa>] 0x2000012a3fa

I believe ext2 is save to write without i_mutex here: The inode is 
newly created by ext2_new_inode, and is not accessible to other 
contexts at this time. On the other hand, ext2_mkdir could grab the 
i_mutex of the newly created inode.

Any advice would be helpful.

                 reply	other threads:[~2006-10-20 12:58 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4538C80D.6060504@de.ibm.com \
    --to=cotte@de.ibm.com \
    --cc=akpm@osdl.org \
    --cc=carsteno@de.ibm.com \
    --cc=linux-fsdevel@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).