Commit 67ade058 authored by Omar Sandoval's avatar Omar Sandoval Committed by Chris Mason

Btrfs: remove old tree_root case in btrfs_read_locked_inode()

As Jeff explained in c2951f32 ("btrfs: remove old tree_root dirent
processing in btrfs_real_readdir()"), supporting this old format is no
longer necessary since the Btrfs magic number has been updated since we
changed to the current format. There are other places where we still
handle this old format, but since this is part of a fix that is going to
stable, I'm only removing this one for now.

Cc: <stable@vger.kernel.org> # 4.9.x
Signed-off-by: default avatarOmar Sandoval <osandov@fb.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarChris Mason <clm@fb.com>
parent 91298eec
...@@ -3835,10 +3835,7 @@ static int btrfs_read_locked_inode(struct inode *inode) ...@@ -3835,10 +3835,7 @@ static int btrfs_read_locked_inode(struct inode *inode)
break; break;
case S_IFDIR: case S_IFDIR:
inode->i_fop = &btrfs_dir_file_operations; inode->i_fop = &btrfs_dir_file_operations;
if (root == fs_info->tree_root) inode->i_op = &btrfs_dir_inode_operations;
inode->i_op = &btrfs_dir_ro_inode_operations;
else
inode->i_op = &btrfs_dir_inode_operations;
break; break;
case S_IFLNK: case S_IFLNK:
inode->i_op = &btrfs_symlink_inode_operations; inode->i_op = &btrfs_symlink_inode_operations;
......
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