From: Ted Ts'o <tytso@mit.edu>
To: Jan Kara <jack@suse.cz>
Cc: linux-ext4@vger.kernel.org
Subject: Re: [PATCH 2/2] ext4: Fix deadlock in ext4_symlink() in ENOSPC conditions
Date: Tue, 3 May 2011 11:18:19 -0400 [thread overview]
Message-ID: <20110503151819.GD6462@thunk.org> (raw)
In-Reply-To: <1304112285-23477-1-git-send-email-jack@suse.cz>
On Fri, Apr 29, 2011 at 11:24:45PM +0200, Jan Kara wrote:
> ext4_symlink() cannot call __page_symlink() with transaction open.
> __page_symlink() calls ext4_write_begin() which can wait for
> transaction commit if we are running out of space thus causing a
> deadlock. Also error recovery in ext4_truncate_failed_write() does
> not count with the transaction being already started (although I'm
> not aware of any particular deadlock here).
>
> Fix the problem by stopping a transaction before calling __page_symlink()
> (we have to be careful and put inode to orphan list so that it gets deleted
> in case of crash) and starting another one after __page_symlink() returns
> for addition of symlink into a directory.
>
> Signed-off-by: Jan Kara <jack@suse.cz>
Thanks, added to the ext4 tree.
- Ted
prev parent reply other threads:[~2011-05-03 15:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-29 21:24 [PATCH 2/2] ext4: Fix deadlock in ext4_symlink() in ENOSPC conditions Jan Kara
2011-05-03 15:18 ` Ted Ts'o [this message]
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=20110503151819.GD6462@thunk.org \
--to=tytso@mit.edu \
--cc=jack@suse.cz \
--cc=linux-ext4@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 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.