diff options
author | Christoph Hellwig <hch@lst.de> | 2010-06-04 11:29:59 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-08-09 22:47:34 +0200 |
commit | d39aae9ec447dda84d9a2850743a78a535a71c90 (patch) | |
tree | e362c3367f093b79482f3034e82b18cd2dc8931a /fs/udf/file.c | |
parent | get rid of block_write_begin_newtrunc (diff) | |
download | linux-d39aae9ec447dda84d9a2850743a78a535a71c90.tar.xz linux-d39aae9ec447dda84d9a2850743a78a535a71c90.zip |
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/udf/file.c')
-rw-r--r-- | fs/udf/file.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/udf/file.c b/fs/udf/file.c index 94e06d6bddbd..7376032c89ce 100644 --- a/fs/udf/file.c +++ b/fs/udf/file.c @@ -228,6 +228,18 @@ const struct file_operations udf_file_operations = { .llseek = generic_file_llseek, }; +static int udf_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 udf_file_inode_operations = { + .setattr = udf_setattr, .truncate = udf_truncate, }; |