Browse Source

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>
Dmitry Monakhov 15 years ago
parent
commit
311b9549ed
5 changed files with 13 additions and 3 deletions
  1. 1 1
      fs/ufs/inode.c
  2. 1 1
      fs/ufs/namei.c
  3. 8 0
      fs/ufs/symlink.c
  4. 1 1
      fs/ufs/truncate.c
  5. 2 0
      fs/ufs/ufs.h

+ 1 - 1
fs/ufs/inode.c

@@ -603,7 +603,7 @@ static void ufs_set_inode_ops(struct inode *inode)
 		if (!inode->i_blocks)
 		if (!inode->i_blocks)
 			inode->i_op = &ufs_fast_symlink_inode_operations;
 			inode->i_op = &ufs_fast_symlink_inode_operations;
 		else {
 		else {
-			inode->i_op = &page_symlink_inode_operations;
+			inode->i_op = &ufs_symlink_inode_operations;
 			inode->i_mapping->a_ops = &ufs_aops;
 			inode->i_mapping->a_ops = &ufs_aops;
 		}
 		}
 	} else
 	} else

+ 1 - 1
fs/ufs/namei.c

@@ -148,7 +148,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
 
 
 	if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) {
 	if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) {
 		/* slow symlink */
 		/* slow symlink */
-		inode->i_op = &page_symlink_inode_operations;
+		inode->i_op = &ufs_symlink_inode_operations;
 		inode->i_mapping->a_ops = &ufs_aops;
 		inode->i_mapping->a_ops = &ufs_aops;
 		err = page_symlink(inode, symname, l);
 		err = page_symlink(inode, symname, l);
 		if (err)
 		if (err)

+ 8 - 0
fs/ufs/symlink.c

@@ -42,4 +42,12 @@ static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
 const struct inode_operations ufs_fast_symlink_inode_operations = {
 const struct inode_operations ufs_fast_symlink_inode_operations = {
 	.readlink	= generic_readlink,
 	.readlink	= generic_readlink,
 	.follow_link	= ufs_follow_link,
 	.follow_link	= ufs_follow_link,
+	.setattr	= ufs_setattr,
+};
+
+const struct inode_operations ufs_symlink_inode_operations = {
+	.readlink	= generic_readlink,
+	.follow_link	= page_follow_link_light,
+	.put_link	= page_put_link,
+	.setattr	= ufs_setattr,
 };
 };

+ 1 - 1
fs/ufs/truncate.c

@@ -508,7 +508,7 @@ out:
  * - there is no way to know old size
  * - there is no way to know old size
  * - there is no way inform user about error, if it happens in `truncate'
  * - there is no way inform user about error, if it happens in `truncate'
  */
  */
-static int ufs_setattr(struct dentry *dentry, struct iattr *attr)
+int ufs_setattr(struct dentry *dentry, struct iattr *attr)
 {
 {
 	struct inode *inode = dentry->d_inode;
 	struct inode *inode = dentry->d_inode;
 	unsigned int ia_valid = attr->ia_valid;
 	unsigned int ia_valid = attr->ia_valid;

+ 2 - 0
fs/ufs/ufs.h

@@ -122,9 +122,11 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
 
 
 /* symlink.c */
 /* symlink.c */
 extern const struct inode_operations ufs_fast_symlink_inode_operations;
 extern const struct inode_operations ufs_fast_symlink_inode_operations;
+extern const struct inode_operations ufs_symlink_inode_operations;
 
 
 /* truncate.c */
 /* truncate.c */
 extern int ufs_truncate (struct inode *, loff_t);
 extern int ufs_truncate (struct inode *, loff_t);
+extern int ufs_setattr(struct dentry *dentry, struct iattr *attr);
 
 
 static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
 static inline struct ufs_sb_info *UFS_SB(struct super_block *sb)
 {
 {