-
Christoph Hellwig authored
Since the big direct I/O rework do_truncate takes i_alloc_sem before calling into ->setattr. Unfortunately the other callers of ->setattr with ATTR_SIZE, most notably nfsd don't take it. The (out of tree) XFS dmapi code relies wants to release i_alloc_sem and thus gets into problems like http://oss.sgi.com/bugzilla/show_bug.cgi?id=365 This patch moves acquiring and releasing i_alloc_sem into notify_change() to make the locking behaviour consistant. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
8dce684c