diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-04 05:29:59 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 16:47:34 -0400 |
commit | d39aae9ec447dda84d9a2850743a78a535a71c90 (patch) | |
tree | e362c3367f093b79482f3034e82b18cd2dc8931a /fs/minix | |
parent | 155130a4f7848b1aac439cab6bda1a175507c71c (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/minix')
-rw-r--r-- | fs/minix/file.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/minix/file.c b/fs/minix/file.c index d5320ff23faf..7a45dd1fe2e5 100644 --- a/fs/minix/file.c +++ b/fs/minix/file.c | |||
@@ -23,7 +23,19 @@ const struct file_operations minix_file_operations = { | |||
23 | .splice_read = generic_file_splice_read, | 23 | .splice_read = generic_file_splice_read, |
24 | }; | 24 | }; |
25 | 25 | ||
26 | static int minix_setattr(struct dentry *dentry, struct iattr *attr) | ||
27 | { | ||
28 | struct inode *inode = dentry->d_inode; | ||
29 | int error; | ||
30 | |||
31 | error = inode_change_ok(inode, attr); | ||
32 | if (error) | ||
33 | return error; | ||
34 | return inode_setattr(inode, attr); | ||
35 | } | ||
36 | |||
26 | const struct inode_operations minix_file_inode_operations = { | 37 | const struct inode_operations minix_file_inode_operations = { |
27 | .truncate = minix_truncate, | 38 | .truncate = minix_truncate, |
39 | .setattr = minix_setattr, | ||
28 | .getattr = minix_getattr, | 40 | .getattr = minix_getattr, |
29 | }; | 41 | }; |