Commit 311b9549ed2bb0f2c2257781c3e88cb00505e80e
Committed by
Jan Kara
1 parent
e0a5cbac02
Exists in
master
and in
7 other branches
ufs: add ufs speciffic ->setattr call
generic setattr not longer responsible for quota transfer. use ufs_setattr for all ufs's inodes. Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> Signed-off-by: Jan Kara <jack@suse.cz>
Showing 5 changed files with 13 additions and 3 deletions Side-by-side Diff
fs/ufs/inode.c
... | ... | @@ -603,7 +603,7 @@ |
603 | 603 | if (!inode->i_blocks) |
604 | 604 | inode->i_op = &ufs_fast_symlink_inode_operations; |
605 | 605 | else { |
606 | - inode->i_op = &page_symlink_inode_operations; | |
606 | + inode->i_op = &ufs_symlink_inode_operations; | |
607 | 607 | inode->i_mapping->a_ops = &ufs_aops; |
608 | 608 | } |
609 | 609 | } else |
fs/ufs/namei.c
... | ... | @@ -148,7 +148,7 @@ |
148 | 148 | |
149 | 149 | if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) { |
150 | 150 | /* slow symlink */ |
151 | - inode->i_op = &page_symlink_inode_operations; | |
151 | + inode->i_op = &ufs_symlink_inode_operations; | |
152 | 152 | inode->i_mapping->a_ops = &ufs_aops; |
153 | 153 | err = page_symlink(inode, symname, l); |
154 | 154 | if (err) |
fs/ufs/symlink.c
... | ... | @@ -42,5 +42,13 @@ |
42 | 42 | const struct inode_operations ufs_fast_symlink_inode_operations = { |
43 | 43 | .readlink = generic_readlink, |
44 | 44 | .follow_link = ufs_follow_link, |
45 | + .setattr = ufs_setattr, | |
46 | +}; | |
47 | + | |
48 | +const struct inode_operations ufs_symlink_inode_operations = { | |
49 | + .readlink = generic_readlink, | |
50 | + .follow_link = page_follow_link_light, | |
51 | + .put_link = page_put_link, | |
52 | + .setattr = ufs_setattr, | |
45 | 53 | }; |
fs/ufs/truncate.c
... | ... | @@ -508,7 +508,7 @@ |
508 | 508 | * - there is no way to know old size |
509 | 509 | * - there is no way inform user about error, if it happens in `truncate' |
510 | 510 | */ |
511 | -static int ufs_setattr(struct dentry *dentry, struct iattr *attr) | |
511 | +int ufs_setattr(struct dentry *dentry, struct iattr *attr) | |
512 | 512 | { |
513 | 513 | struct inode *inode = dentry->d_inode; |
514 | 514 | unsigned int ia_valid = attr->ia_valid; |
fs/ufs/ufs.h
... | ... | @@ -122,9 +122,11 @@ |
122 | 122 | |
123 | 123 | /* symlink.c */ |
124 | 124 | extern const struct inode_operations ufs_fast_symlink_inode_operations; |
125 | +extern const struct inode_operations ufs_symlink_inode_operations; | |
125 | 126 | |
126 | 127 | /* truncate.c */ |
127 | 128 | extern int ufs_truncate (struct inode *, loff_t); |
129 | +extern int ufs_setattr(struct dentry *dentry, struct iattr *attr); | |
128 | 130 | |
129 | 131 | static inline struct ufs_sb_info *UFS_SB(struct super_block *sb) |
130 | 132 | { |