diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-04 11:29:59 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-06-07 22:30:11 -0400 |
commit | 9a1c796943cbb8638116af95c46ff3ebc8beed95 (patch) | |
tree | 778eda5e514d4075648e42473e5ba82c2e351535 /fs/sysv | |
parent | de1c94a414c082eaac54adf9a33d21f76b686cc4 (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/sysv')
-rw-r--r-- | fs/sysv/file.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/sysv/file.c b/fs/sysv/file.c index 750cc22349bd..94f6319292a1 100644 --- a/fs/sysv/file.c +++ b/fs/sysv/file.c @@ -30,7 +30,19 @@ const struct file_operations sysv_file_operations = { .splice_read = generic_file_splice_read, }; +static int sysv_setattr(struct dentry *dentry, struct iattr *attr) +{ + struct inode *inode = dentry->d_inode; + int error; + + error = inode_change_ok(inode, attr); + if (error) + return error; + return inode_setattr(inode, attr); +} + const struct inode_operations sysv_file_inode_operations = { .truncate = sysv_truncate, + .setattr = sysv_setattr, .getattr = sysv_getattr, }; |