Commit 8de60fe9 authored by Goldwyn Rodrigues's avatar Goldwyn Rodrigues Committed by David Sterba

btrfs: Initialize inode::i_mapping once in btrfs_symlink

inode->i_op is initialized multiple times. Perform it once. This was
left by 4779cc04 ("Btrfs: get rid of btrfs_symlink_aops").
Signed-off-by: default avatarGoldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 7ac1e464
...@@ -10193,7 +10193,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, ...@@ -10193,7 +10193,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
inode->i_op = &btrfs_symlink_inode_operations; inode->i_op = &btrfs_symlink_inode_operations;
inode_nohighmem(inode); inode_nohighmem(inode);
inode->i_mapping->a_ops = &btrfs_aops;
inode_set_bytes(inode, name_len); inode_set_bytes(inode, name_len);
btrfs_i_size_write(BTRFS_I(inode), name_len); btrfs_i_size_write(BTRFS_I(inode), name_len);
err = btrfs_update_inode(trans, root, inode); err = btrfs_update_inode(trans, root, inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment