Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dmitry Monakhov and committed by
Jan Kara
311b9549 e0a5cbac

+13 -3
+1 -1
fs/ufs/inode.c
··· 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
+1 -1
fs/ufs/namei.c
··· 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)
+8
fs/ufs/symlink.c
··· 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 };
+1 -1
fs/ufs/truncate.c
··· 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;
+2
fs/ufs/ufs.h
··· 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 {