jfs: Use lowercase names of quota functions
[linux-block.git] / fs / jfs / inode.c
index 210339784b56f98a29ca2d75e2c2cf082dae904a..b2ae190a77ba240b04f8175d7b2e2c65aaa20b3d 100644 (file)
@@ -59,8 +59,14 @@ struct inode *jfs_iget(struct super_block *sb, unsigned long ino)
                if (inode->i_size >= IDATASIZE) {
                        inode->i_op = &page_symlink_inode_operations;
                        inode->i_mapping->a_ops = &jfs_aops;
-               } else
+               } else {
                        inode->i_op = &jfs_symlink_inode_operations;
+                       /*
+                        * The inline data should be null-terminated, but
+                        * don't let on-disk corruption crash the kernel
+                        */
+                       JFS_IP(inode)->i_inline[inode->i_size] = '\0';
+               }
        } else {
                inode->i_op = &jfs_file_inode_operations;
                init_special_inode(inode, inode->i_mode, inode->i_rdev);
@@ -152,9 +158,9 @@ void jfs_delete_inode(struct inode *inode)
                /*
                 * Free the inode from the quota allocation.
                 */
-               DQUOT_INIT(inode);
-               DQUOT_FREE_INODE(inode);
-               DQUOT_DROP(inode);
+               vfs_dq_init(inode);
+               vfs_dq_free_inode(inode);
+               vfs_dq_drop(inode);
        }
 
        clear_inode(inode);