Re: 2.6.19-rc2-mm1

Andrew Morton
2006-10-18T22:30:05Z

On Wed, 18 Oct 2006 23:44:03 +0200 (CEST)
Jiri Kosina <jikos@jikos.cz> wrote:

> [PATCH] VFS: fix i_mutex locking in page_symlink()
>
> The inode->i_mutex should be held every time when calling i_size_write(),
> and the function contains WARN_ON() for that condition.
> page_symlink(), however, does not lock i_mutex. It is perfectly OK, as the
> i_mutex for the directory is held at the time page_symlink() is running,
> so noone is able to change i_size during race condition. However,
> i_size_write() spits out the warning without this patch.
>

I suspect it isn't necessary because the symlink's inode hasn't been wired
up into the directory tree yet and no other thread can find it and do
things to it.