]> git.neil.brown.name Git - history.git/commit
[PATCH] fix ->setattr ATTR_SIZE locking for nfsd
authorChristoph Hellwig <hch@lst.de>
Tue, 11 Jan 2005 11:18:47 +0000 (03:18 -0800)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 11 Jan 2005 11:18:47 +0000 (03:18 -0800)
commit8dce684cff3c14dd87ea3fce604152a7468751e8
tree8c3e869e3466f8e78f78b8f9ec13674091378121
parentd7300467ba8b26455993605bd4aef4740a900e67
[PATCH] fix ->setattr ATTR_SIZE locking for nfsd

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>
fs/attr.c
fs/open.c