Re: [PATCH] ext4: fix ext4_evict_inode() racing against workqueue processing code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.)

					- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux