diff options
Diffstat (limited to 'fs/ocfs2/namei.c')
-rw-r--r-- | fs/ocfs2/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index a9856e3eaaf0..9f39c640cddf 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c | |||
@@ -1724,15 +1724,16 @@ static int ocfs2_symlink(struct inode *dir, | |||
1724 | fe = (struct ocfs2_dinode *) new_fe_bh->b_data; | 1724 | fe = (struct ocfs2_dinode *) new_fe_bh->b_data; |
1725 | inode->i_rdev = 0; | 1725 | inode->i_rdev = 0; |
1726 | newsize = l - 1; | 1726 | newsize = l - 1; |
1727 | inode->i_op = &ocfs2_symlink_inode_operations; | ||
1727 | if (l > ocfs2_fast_symlink_chars(sb)) { | 1728 | if (l > ocfs2_fast_symlink_chars(sb)) { |
1728 | u32 offset = 0; | 1729 | u32 offset = 0; |
1729 | 1730 | ||
1730 | inode->i_op = &ocfs2_symlink_inode_operations; | ||
1731 | status = dquot_alloc_space_nodirty(inode, | 1731 | status = dquot_alloc_space_nodirty(inode, |
1732 | ocfs2_clusters_to_bytes(osb->sb, 1)); | 1732 | ocfs2_clusters_to_bytes(osb->sb, 1)); |
1733 | if (status) | 1733 | if (status) |
1734 | goto bail; | 1734 | goto bail; |
1735 | did_quota = 1; | 1735 | did_quota = 1; |
1736 | inode->i_mapping->a_ops = &ocfs2_aops; | ||
1736 | status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, | 1737 | status = ocfs2_add_inode_data(osb, inode, &offset, 1, 0, |
1737 | new_fe_bh, | 1738 | new_fe_bh, |
1738 | handle, data_ac, NULL, | 1739 | handle, data_ac, NULL, |
@@ -1750,7 +1751,7 @@ static int ocfs2_symlink(struct inode *dir, | |||
1750 | i_size_write(inode, newsize); | 1751 | i_size_write(inode, newsize); |
1751 | inode->i_blocks = ocfs2_inode_sector_count(inode); | 1752 | inode->i_blocks = ocfs2_inode_sector_count(inode); |
1752 | } else { | 1753 | } else { |
1753 | inode->i_op = &ocfs2_fast_symlink_inode_operations; | 1754 | inode->i_mapping->a_ops = &ocfs2_fast_symlink_aops; |
1754 | memcpy((char *) fe->id2.i_symlink, symname, l); | 1755 | memcpy((char *) fe->id2.i_symlink, symname, l); |
1755 | i_size_write(inode, newsize); | 1756 | i_size_write(inode, newsize); |
1756 | inode->i_blocks = 0; | 1757 | inode->i_blocks = 0; |