From: Omar Sandoval Date: Thu, 26 Jan 2017 01:06:38 +0000 (-0800) Subject: Btrfs: remove old tree_root case in btrfs_read_locked_inode() X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4e98b91db1cc242de4cb87493deebb97c626e993;p=linux Btrfs: remove old tree_root case in btrfs_read_locked_inode() commit 67ade058ef2c65a3e56878af9c293ec76722a2e5 upstream. As Jeff explained in c2951f32d36c ("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. Signed-off-by: Omar Sandoval Reviewed-by: David Sterba Signed-off-by: Chris Mason Signed-off-by: Greg Kroah-Hartman (cherry picked from commit 79babd4a6ce26d6b0e6a56da47efb723431abc70) --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index cafff04835eb0..12db964b7257a 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -3782,10 +3782,7 @@ cache_acl: break; case S_IFDIR: inode->i_fop = &btrfs_dir_file_operations; - if (root == 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;