From: Al Viro <viro@ZenIV.linux.org.uk>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fs: take i_mutex in __page_symlink()
Date: Mon, 1 Apr 2013 17:35:38 +0100 [thread overview]
Message-ID: <20130401163538.GC21522@ZenIV.linux.org.uk> (raw)
In-Reply-To: <1364829822-18989-1-git-send-email-tytso@mit.edu>
On Mon, Apr 01, 2013 at 11:23:42AM -0400, Theodore Ts'o wrote:
> In Documentation/filesystems/Locking, it's documented that
> write_begin() is guaranteed to be called with i_mutex locked. The
> function __page_symlink() was not taking i_mutex before calling
> pagecache_write_begin(), which will eventually result in the file
> system's write_begin()'s function getting called.
>
> Other callers of pagecache_write_begin such as in fs/splice.c, call
> pagecache_write_begin() with i_mutex locked, so fix __page_symlink()
> to be consistent.
>
> This was discovered by the addition of a new ext4 debugging assertion
> which checked to make sure i_mutex was locked before calling
> ext4_truncate().
I doubt that it's worth doing (inode has just been created and
nobody else should have references to it - it's not fully set up, after
all)...
next prev parent reply other threads:[~2013-04-01 16:35 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-27 13:19 [PATCH] ext4: take i_mutex in ext4_symlink to eliminate a warning from ext4_truncate Zheng Liu
2013-03-27 13:41 ` Theodore Ts'o
2013-03-27 14:02 ` Zheng Liu
2013-03-27 13:51 ` Theodore Ts'o
2013-03-27 15:07 ` Zheng Liu
2013-03-27 15:19 ` Zheng Liu
2013-03-27 15:12 ` Theodore Ts'o
2013-03-27 15:35 ` Zheng Liu
2013-03-28 14:06 ` Theodore Ts'o
2013-04-01 15:23 ` [PATCH] fs: take i_mutex in __page_symlink() Theodore Ts'o
2013-04-01 16:35 ` Al Viro [this message]
2013-04-01 17:38 ` Theodore Ts'o
2013-04-02 8:19 ` Dmitry Monakhov
2013-03-27 14:04 ` [PATCH] ext4: take i_mutex in ext4_symlink to eliminate a warning from ext4_truncate Zheng Liu
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=20130401163538.GC21522@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.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.