aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/inode.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2010-06-04 05:29:59 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2010-08-09 16:47:34 -0400
commitd39aae9ec447dda84d9a2850743a78a535a71c90 (patch)
treee362c3367f093b79482f3034e82b18cd2dc8931a /fs/hfsplus/inode.c
parent155130a4f7848b1aac439cab6bda1a175507c71c (diff)
add missing setattr methods
For the new truncate sequence every filesystem that wants to truncate on-disk state needs a seattr method. Convert the remaining filesystems that implement the truncate inode operation to have its own setattr method. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/hfsplus/inode.c')
-rw-r--r--fs/hfsplus/inode.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/hfsplus/inode.c b/fs/hfsplus/inode.c
index 88bf1b562641..d6ebe53fbdbf 100644
--- a/fs/hfsplus/inode.c
+++ b/fs/hfsplus/inode.c
@@ -290,9 +290,21 @@ static int hfsplus_file_release(struct inode *inode, struct file *file)
290 return 0; 290 return 0;
291} 291}
292 292
293static int hfsplus_setattr(struct dentry *dentry, struct iattr *attr)
294{
295 struct inode *inode = dentry->d_inode;
296 int error;
297
298 error = inode_change_ok(inode, attr);
299 if (error)
300 return error;
301 return inode_setattr(inode, attr);
302}
303
293static const struct inode_operations hfsplus_file_inode_operations = { 304static const struct inode_operations hfsplus_file_inode_operations = {
294 .lookup = hfsplus_file_lookup, 305 .lookup = hfsplus_file_lookup,
295 .truncate = hfsplus_file_truncate, 306 .truncate = hfsplus_file_truncate,
307 .setattr = hfsplus_setattr,
296 .setxattr = hfsplus_setxattr, 308 .setxattr = hfsplus_setxattr,
297 .getxattr = hfsplus_getxattr, 309 .getxattr = hfsplus_getxattr,
298 .listxattr = hfsplus_listxattr, 310 .listxattr = hfsplus_listxattr,