Skip to content

Commit

Permalink
Btrfs: remove old tree_root case in btrfs_read_locked_inode()
Browse files Browse the repository at this point in the history
As Jeff explained in c2951f3 ("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: <[email protected]> # 4.9.x
Signed-off-by: Omar Sandoval <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: Chris Mason <[email protected]>
  • Loading branch information
osandov authored and masoncl committed Jan 26, 2017
1 parent 91298ee commit 67ade05
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -3835,10 +3835,7 @@ static int btrfs_read_locked_inode(struct inode *inode)
break;
case S_IFDIR:
inode->i_fop = &btrfs_dir_file_operations;
if (root == fs_info->tree_root)
inode->i_op = &btrfs_dir_ro_inode_operations;
else
inode->i_op = &btrfs_dir_inode_operations;
inode->i_op = &btrfs_dir_inode_operations;
break;
case S_IFLNK:
inode->i_op = &btrfs_symlink_inode_operations;
Expand Down

0 comments on commit 67ade05

Please sign in to comment.