Messages in this thread | | | Date | Fri, 16 Dec 2011 22:54:51 +0100 | From | Djalal Harouni <> | Subject | Re: [PATCH] mm: add missing mutex lock arround notify_change |
| |
On Fri, Dec 16, 2011 at 12:55:56PM -0800, Andrew Morton wrote: > On Fri, 16 Dec 2011 12:25:34 +0100 > Djalal Harouni <tixxdz@opendz.org> wrote: > > > > > Calls to notify_change() must hold i_mutex. > > > > ... > > <does a quick audit> > > fs/hpfs/namei.c and fs/nfsd/vfs.c:nfsd_setattr() aren't obviosuly > holding that lock when calling notify_change(). Everything else under > fs/ looks OK.
fs/nfsd/vfs.c:nfsd_setattr() is calling fh_lock() which calls mutex_lock_nested() with the appropriate i_mutex of the dentry object. There are some extra functions before the lock which are related to nfsd.
fs/hpfs/namei.c:hpfs_unlink() is using hpfs_lock() to lock the whole filesystem.
So they are OK.
-- tixxdz http://opendz.org
| |