ufs: add ufs speciffic ->setattr call
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 14 Apr 2010 22:56:58 +0000 (00:56 +0200)
committerJan Kara <jack@suse.cz>
Fri, 21 May 2010 17:30:40 +0000 (19:30 +0200)
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>
fs/ufs/inode.c
fs/ufs/namei.c
fs/ufs/symlink.c
fs/ufs/truncate.c
fs/ufs/ufs.h

index 80b68c3702d129bffeaddbdd388b7ad50ca74e4b..cffa756f1047c56dba2255863ebe2146b8dff9b4 100644 (file)
@@ -603,7 +603,7 @@ static void ufs_set_inode_ops(struct inode *inode)
                if (!inode->i_blocks)
                        inode->i_op = &ufs_fast_symlink_inode_operations;
                else {
-                       inode->i_op = &page_symlink_inode_operations;
+                       inode->i_op = &ufs_symlink_inode_operations;
                        inode->i_mapping->a_ops = &ufs_aops;
                }
        } else
index 118556243e7ab60bd2f58aa1f809ee26336f107e..eabc02eb12944ae2a876ff6e2bd91ea30a6e960d 100644 (file)
@@ -148,7 +148,7 @@ static int ufs_symlink (struct inode * dir, struct dentry * dentry,
 
        if (l > UFS_SB(sb)->s_uspi->s_maxsymlinklen) {
                /* slow symlink */
-               inode->i_op = &page_symlink_inode_operations;
+               inode->i_op = &ufs_symlink_inode_operations;
                inode->i_mapping->a_ops = &ufs_aops;
                err = page_symlink(inode, symname, l);
                if (err)
index c0156eda44bcff1e53e17689167da63b046ca926..d283628b4778bc4fef3a07d8bf8b267458c1e389 100644 (file)
@@ -42,4 +42,12 @@ static void *ufs_follow_link(struct dentry *dentry, struct nameidata *nd)
 const struct inode_operations ufs_fast_symlink_inode_operations = {
        .readlink       = generic_readlink,
        .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,
 };
index d3b6270cb377ad2afb48184dd379aff63f8c2143..ee8db3e77bfedd74f067f0d7352bc464f7703482 100644 (file)
@@ -508,7 +508,7 @@ out:
  * - there is no way to know old size
  * - 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;
        unsigned int ia_valid = attr->ia_valid;
index 43f9f5d5670eba80cfd01a89407b1da246d0c757..179ae6b3180a1efe88505be3246029b7dffbfbd6 100644 (file)
@@ -122,9 +122,11 @@ extern void ufs_panic (struct super_block *, const char *, const char *, ...) __
 
 /* symlink.c */
 extern const struct inode_operations ufs_fast_symlink_inode_operations;
+extern const struct inode_operations ufs_symlink_inode_operations;
 
 /* truncate.c */
 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)
 {