]> bbs.cooldavid.org Git - net-next-2.6.git/commit
default to simple_setattr
authorChristoph Hellwig <hch@lst.de>
Fri, 4 Jun 2010 09:30:01 +0000 (11:30 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 9 Aug 2010 20:47:36 +0000 (16:47 -0400)
commiteef2380c187890816b73b1a4cb89a09203759469
tree1b4764753f0e2c718accd4f3541493efcd663007
parent6a1a90ad1b0edb556a7550a6ef8a8756f0304dd5
default to simple_setattr

With the new truncate sequence every filesystem that wants to support file
size changes on disk needs to implement its own ->setattr.  So instead
of calling inode_setattr which supports size changes call into a simple
method that doesn't support this.  simple_setattr is almost what we
want except that it does not mark the inode dirty after changes.  Given
that marking the inode dirty is a no-op for the simple in-memory filesystems
that use simple_setattr currently just add the mark_inode_dirty call.

Also add a WARN_ON for the presence of a truncate method to simple_setattr
to catch new instances of it during the transition period.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/attr.c
fs/libfs.c