diff mbox series

[2/3] btrfs: Initialize inode->i_op once in btrfs_symlink

Message ID 20190225190744.21664-2-rgoldwyn@suse.de (mailing list archive)
State New, archived
Headers show
Series None | expand

Commit Message

Goldwyn Rodrigues Feb. 25, 2019, 7:07 p.m. UTC
From: Goldwyn Rodrigues <rgoldwyn@suse.com>

inode->i_op is initialized multiple times. Perform it once.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
---
 fs/btrfs/inode.c | 1 -
 1 file changed, 1 deletion(-)

Comments

David Sterba Feb. 27, 2019, 3:39 p.m. UTC | #1
On Mon, Feb 25, 2019 at 01:07:43PM -0600, Goldwyn Rodrigues wrote:
> From: Goldwyn Rodrigues <rgoldwyn@suse.com>
> 
> inode->i_op is initialized multiple times. Perform it once.
> 
> Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>

Leftover from 4779cc04248deff6

Reviewed-by: David Sterba <dsterba@suse.com>
diff mbox series

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 5c349667c761..9b77fe994cbb 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -10140,7 +10140,6 @@  static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
 
 	inode->i_op = &btrfs_symlink_inode_operations;
 	inode_nohighmem(inode);
-	inode->i_mapping->a_ops = &btrfs_aops;
 	inode_set_bytes(inode, name_len);
 	btrfs_i_size_write(BTRFS_I(inode), name_len);
 	err = btrfs_update_inode(trans, root, inode);