Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3962dfbe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull btrfs fixes from Chris Mason:
 "We have a small collection of fixes in my for-linus branch.

  The big thing that stands out is a revert of a new ioctl.  Users
  haven't shipped yet in btrfs-progs, and Dave Sterba found a better way
  to export the information"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: use right clone root offset for compressed extents
  btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105
  Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
  Btrfs: fix max_inline mount option
  Btrfs: fix a lockdep warning when cleaning up aborted transaction
  Revert "btrfs: add ioctl to export size of global metadata reservation"
parents 4302a875 93de4ba8
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -3839,7 +3839,6 @@ static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans,
			rb_erase(&ref->rb_node, &head->ref_root);
			rb_erase(&ref->rb_node, &head->ref_root);
			atomic_dec(&delayed_refs->num_entries);
			atomic_dec(&delayed_refs->num_entries);
			btrfs_put_delayed_ref(ref);
			btrfs_put_delayed_ref(ref);
			cond_resched_lock(&head->lock);
		}
		}
		if (head->must_insert_reserved)
		if (head->must_insert_reserved)
			pin_bytes = true;
			pin_bytes = true;
+1 −1
Original line number Original line Diff line number Diff line
@@ -5154,7 +5154,7 @@ static struct dentry *btrfs_lookup(struct inode *dir, struct dentry *dentry,
			return ERR_CAST(inode);
			return ERR_CAST(inode);
	}
	}


	return d_splice_alias(inode, dentry);
	return d_materialise_unique(dentry, inode);
}
}


unsigned char btrfs_filetype_table[] = {
unsigned char btrfs_filetype_table[] = {
+0 −16
Original line number Original line Diff line number Diff line
@@ -3537,20 +3537,6 @@ out:
	return ret;
	return ret;
}
}


static long btrfs_ioctl_global_rsv(struct btrfs_root *root, void __user *arg)
{
	struct btrfs_block_rsv *block_rsv = &root->fs_info->global_block_rsv;
	u64 reserved;

	spin_lock(&block_rsv->lock);
	reserved = block_rsv->reserved;
	spin_unlock(&block_rsv->lock);

	if (arg && copy_to_user(arg, &reserved, sizeof(reserved)))
		return -EFAULT;
	return 0;
}

/*
/*
 * there are many ways the trans_start and trans_end ioctls can lead
 * there are many ways the trans_start and trans_end ioctls can lead
 * to deadlocks.  They should only be used by applications that
 * to deadlocks.  They should only be used by applications that
@@ -4757,8 +4743,6 @@ long btrfs_ioctl(struct file *file, unsigned int
		return btrfs_ioctl_logical_to_ino(root, argp);
		return btrfs_ioctl_logical_to_ino(root, argp);
	case BTRFS_IOC_SPACE_INFO:
	case BTRFS_IOC_SPACE_INFO:
		return btrfs_ioctl_space_info(root, argp);
		return btrfs_ioctl_space_info(root, argp);
	case BTRFS_IOC_GLOBAL_RSV:
		return btrfs_ioctl_global_rsv(root, argp);
	case BTRFS_IOC_SYNC: {
	case BTRFS_IOC_SYNC: {
		int ret;
		int ret;


+10 −0
Original line number Original line Diff line number Diff line
@@ -1332,6 +1332,16 @@ verbose_printk(KERN_DEBUG "btrfs: find_extent_clone: data_offset=%llu, "
	}
	}


	if (cur_clone_root) {
	if (cur_clone_root) {
		if (compressed != BTRFS_COMPRESS_NONE) {
			/*
			 * Offsets given by iterate_extent_inodes() are relative
			 * to the start of the extent, we need to add logical
			 * offset from the file extent item.
			 * (See why at backref.c:check_extent_in_eb())
			 */
			cur_clone_root->offset += btrfs_file_extent_offset(eb,
									   fi);
		}
		*found = cur_clone_root;
		*found = cur_clone_root;
		ret = 0;
		ret = 0;
	} else {
	} else {
+9 −2
Original line number Original line Diff line number Diff line
@@ -566,7 +566,7 @@ int btrfs_parse_options(struct btrfs_root *root, char *options)
				kfree(num);
				kfree(num);


				if (info->max_inline) {
				if (info->max_inline) {
					info->max_inline = max_t(u64,
					info->max_inline = min_t(u64,
						info->max_inline,
						info->max_inline,
						root->sectorsize);
						root->sectorsize);
				}
				}
@@ -855,6 +855,7 @@ static struct dentry *get_default_root(struct super_block *sb,
	struct btrfs_path *path;
	struct btrfs_path *path;
	struct btrfs_key location;
	struct btrfs_key location;
	struct inode *inode;
	struct inode *inode;
	struct dentry *dentry;
	u64 dir_id;
	u64 dir_id;
	int new = 0;
	int new = 0;


@@ -925,7 +926,13 @@ setup_root:
		return dget(sb->s_root);
		return dget(sb->s_root);
	}
	}


	return d_obtain_alias(inode);
	dentry = d_obtain_alias(inode);
	if (!IS_ERR(dentry)) {
		spin_lock(&dentry->d_lock);
		dentry->d_flags &= ~DCACHE_DISCONNECTED;
		spin_unlock(&dentry->d_lock);
	}
	return dentry;
}
}


static int btrfs_fill_super(struct super_block *sb,
static int btrfs_fill_super(struct super_block *sb,
Loading