From: Jan Kara <jack@suse.cz>
To: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>,
Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH] ext4: fix ext4_evict_inode() racing against workqueue processing code
Date: Wed, 20 Mar 2013 14:42:26 +0100 [thread overview]
Message-ID: <20130320134226.GF13294@quack.suse.cz> (raw)
In-Reply-To: <20130320133751.GC12865@thunk.org>
On Wed 20-03-13 09:37:51, Ted Tso wrote:
> On Wed, Mar 20, 2013 at 02:22:23PM +0100, Jan Kara wrote:
> > > + if (work_pending(&EXT4_I(inode)->i_unwritten_work))
> > > + flush_work(&EXT4_I(inode)->i_unwritten_work);
> > > }
> > Won't it be more logical to use cancel_work_sync() here?
>
> Hmm.... yes, probably, but then ext4_ioend_wait() can only be safely
> used by ext4_evict_inode(). I'll make the change, but I'll also make
> a comment to this effect. (No one else is using it now, but if there
> was ever a need to use it while the inode was in use, using
> cancel_work_sync() would be highly dagernous/racy. That being said, I
> can't really think of a good use case other than evict_inode path, so
> it seems fine to make this change.)
Yeah, we can possibly rename the function or maybe even just inline it in
ext4_evict_inode?
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2013-03-20 13:42 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 1:29 [PATCH] ext4: fix ext4_evict_inode() racing against workqueue processing code Theodore Ts'o
2013-03-20 1:38 ` Theodore Ts'o
2013-03-20 13:22 ` Jan Kara
2013-03-20 13:37 ` Theodore Ts'o
2013-03-20 13:42 ` Jan Kara [this message]
2013-03-20 13:51 ` Theodore Ts'o
2013-03-20 14:14 ` Eric Sandeen
2013-03-20 14:45 ` Theodore Ts'o
2013-03-20 20:13 ` Jan Kara
2013-03-26 5:52 ` Zheng Liu
2013-03-26 5:55 ` Zheng Liu
2013-03-26 20:34 ` Jan Kara
2013-03-27 3:13 ` Zheng Liu
2013-03-29 7:32 ` 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=20130320134226.GF13294@quack.suse.cz \
--to=jack@suse.cz \
--cc=linux-ext4@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 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).