diff options
| -rw-r--r-- | fs/ocfs2/dlmfs/dlmfs.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index e21ce0e5fc42..13ac2bffb05d 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
| @@ -220,6 +220,23 @@ static int dlmfs_file_release(struct inode *inode, | |||
| 220 | return 0; | 220 | return 0; |
| 221 | } | 221 | } |
| 222 | 222 | ||
| 223 | /* | ||
| 224 | * We do ->setattr() just to override size changes. Our size is the size | ||
| 225 | * of the LVB and nothing else. | ||
| 226 | */ | ||
| 227 | static int dlmfs_file_setattr(struct dentry *dentry, struct iattr *attr) | ||
| 228 | { | ||
| 229 | int error; | ||
| 230 | struct inode *inode = dentry->d_inode; | ||
| 231 | |||
| 232 | attr->ia_valid &= ~ATTR_SIZE; | ||
| 233 | error = inode_change_ok(inode, attr); | ||
| 234 | if (!error) | ||
| 235 | error = inode_setattr(inode, attr); | ||
| 236 | |||
| 237 | return error; | ||
| 238 | } | ||
| 239 | |||
| 223 | static unsigned int dlmfs_file_poll(struct file *file, poll_table *wait) | 240 | static unsigned int dlmfs_file_poll(struct file *file, poll_table *wait) |
| 224 | { | 241 | { |
| 225 | int event = 0; | 242 | int event = 0; |
| @@ -634,6 +651,7 @@ static const struct super_operations dlmfs_ops = { | |||
| 634 | 651 | ||
| 635 | static const struct inode_operations dlmfs_file_inode_operations = { | 652 | static const struct inode_operations dlmfs_file_inode_operations = { |
| 636 | .getattr = simple_getattr, | 653 | .getattr = simple_getattr, |
| 654 | .setattr = dlmfs_file_setattr, | ||
| 637 | }; | 655 | }; |
| 638 | 656 | ||
| 639 | static int dlmfs_get_sb(struct file_system_type *fs_type, | 657 | static int dlmfs_get_sb(struct file_system_type *fs_type, |
