--- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -6640,7 +6640,7 @@ struct extent_map *btrfs_get_extent(stru extent_type == BTRFS_FILE_EXTENT_PREALLOC) { /* Only regular file could have regular/prealloc extent */ if (!S_ISREG(inode->vfs_inode.i_mode)) { - ret = -EUCLEAN; + err = -EUCLEAN; btrfs_crit(fs_info, "regular/prealloc extent found for non-regular inode %llu", btrfs_ino(inode));