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

Commit 45d9a222 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull vfs pile 1 from Al Viro:
 "Unfortunately, this merge window it'll have a be a lot of small piles -
  my fault, actually, for not keeping #for-next in anything that would
  resemble a sane shape ;-/

  This pile: assorted fixes (the first 3 are -stable fodder, IMO) and
  cleanups + %pd/%pD formats (dentry/file pathname, up to 4 last
  components) + several long-standing patches from various folks.

  There definitely will be a lot more (starting with Miklos'
  check_submount_and_drop() series)"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (26 commits)
  direct-io: Handle O_(D)SYNC AIO
  direct-io: Implement generic deferred AIO completions
  add formats for dentry/file pathnames
  kvm eventfd: switch to fdget
  powerpc kvm: use fdget
  switch fchmod() to fdget
  switch epoll_ctl() to fdget
  switch copy_module_from_fd() to fdget
  git simplify nilfs check for busy subtree
  ibmasmfs: don't bother passing superblock when not needed
  don't pass superblock to hypfs_{mkdir,create*}
  don't pass superblock to hypfs_diag_create_files
  don't pass superblock to hypfs_vm_create_files()
  oprofile: get rid of pointless forward declarations of struct super_block
  oprofilefs_create_...() do not need superblock argument
  oprofilefs_mkdir() doesn't need superblock argument
  don't bother with passing superblock to oprofile_create_stats_files()
  oprofile: don't bother with passing superblock to ->create_files()
  don't bother passing sb to oprofile_create_files()
  coh901318: don't open-code simple_read_from_buffer()
  ...
parents 2386a3b0 02afc27f
Loading
Loading
Loading
Loading
+9 −0
Original line number Original line Diff line number Diff line
@@ -168,6 +168,15 @@ UUID/GUID addresses:
	Where no additional specifiers are used the default little endian
	Where no additional specifiers are used the default little endian
	order with lower case hex characters will be printed.
	order with lower case hex characters will be printed.


dentry names:
	%pd{,2,3,4}
	%pD{,2,3,4}

	For printing dentry name; if we race with d_move(), the name might be
	a mix of old and new ones, but it won't oops.  %pd dentry is a safer
	equivalent of %s dentry->d_name.name we used to use, %pd<n> prints
	n last components.  %pD does the same thing for struct file.

struct va_format:
struct va_format:


	%pV
	%pV
+11 −11
Original line number Original line Diff line number Diff line
@@ -106,7 +106,7 @@ op_axp_stop(void)
}
}


static int
static int
op_axp_create_files(struct super_block *sb, struct dentry *root)
op_axp_create_files(struct dentry *root)
{
{
	int i;
	int i;


@@ -115,23 +115,23 @@ op_axp_create_files(struct super_block *sb, struct dentry *root)
		char buf[4];
		char buf[4];


		snprintf(buf, sizeof buf, "%d", i);
		snprintf(buf, sizeof buf, "%d", i);
		dir = oprofilefs_mkdir(sb, root, buf);
		dir = oprofilefs_mkdir(root, buf);


		oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled);
		oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
                oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event);
                oprofilefs_create_ulong(dir, "event", &ctr[i].event);
		oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count);
		oprofilefs_create_ulong(dir, "count", &ctr[i].count);
		/* Dummies.  */
		/* Dummies.  */
		oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel);
		oprofilefs_create_ulong(dir, "kernel", &ctr[i].kernel);
		oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user);
		oprofilefs_create_ulong(dir, "user", &ctr[i].user);
		oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask);
		oprofilefs_create_ulong(dir, "unit_mask", &ctr[i].unit_mask);
	}
	}


	if (model->can_set_proc_mode) {
	if (model->can_set_proc_mode) {
		oprofilefs_create_ulong(sb, root, "enable_pal",
		oprofilefs_create_ulong(root, "enable_pal",
					&sys.enable_pal);
					&sys.enable_pal);
		oprofilefs_create_ulong(sb, root, "enable_kernel",
		oprofilefs_create_ulong(root, "enable_kernel",
					&sys.enable_kernel);
					&sys.enable_kernel);
		oprofilefs_create_ulong(sb, root, "enable_user",
		oprofilefs_create_ulong(root, "enable_user",
					&sys.enable_user);
					&sys.enable_user);
	}
	}


+8 −9
Original line number Original line Diff line number Diff line
@@ -97,8 +97,7 @@ static irqreturn_t avr32_perf_counter_interrupt(int irq, void *dev_id)
	return IRQ_HANDLED;
	return IRQ_HANDLED;
}
}


static int avr32_perf_counter_create_files(struct super_block *sb,
static int avr32_perf_counter_create_files(struct dentry *root)
		struct dentry *root)
{
{
	struct dentry *dir;
	struct dentry *dir;
	unsigned int i;
	unsigned int i;
@@ -106,21 +105,21 @@ static int avr32_perf_counter_create_files(struct super_block *sb,


	for (i = 0; i < NR_counter; i++) {
	for (i = 0; i < NR_counter; i++) {
		snprintf(filename, sizeof(filename), "%u", i);
		snprintf(filename, sizeof(filename), "%u", i);
		dir = oprofilefs_mkdir(sb, root, filename);
		dir = oprofilefs_mkdir(root, filename);


		oprofilefs_create_ulong(sb, dir, "enabled",
		oprofilefs_create_ulong(dir, "enabled",
				&counter[i].enabled);
				&counter[i].enabled);
		oprofilefs_create_ulong(sb, dir, "event",
		oprofilefs_create_ulong(dir, "event",
				&counter[i].event);
				&counter[i].event);
		oprofilefs_create_ulong(sb, dir, "count",
		oprofilefs_create_ulong(dir, "count",
				&counter[i].count);
				&counter[i].count);


		/* Dummy entries */
		/* Dummy entries */
		oprofilefs_create_ulong(sb, dir, "kernel",
		oprofilefs_create_ulong(dir, "kernel",
				&counter[i].kernel);
				&counter[i].kernel);
		oprofilefs_create_ulong(sb, dir, "user",
		oprofilefs_create_ulong(dir, "user",
				&counter[i].user);
				&counter[i].user);
		oprofilefs_create_ulong(sb, dir, "unit_mask",
		oprofilefs_create_ulong(dir, "unit_mask",
				&counter[i].unit_mask);
				&counter[i].unit_mask);
	}
	}


+10 −10
Original line number Original line Diff line number Diff line
@@ -33,7 +33,7 @@ static int op_mips_setup(void)
	return 0;
	return 0;
}
}


static int op_mips_create_files(struct super_block *sb, struct dentry *root)
static int op_mips_create_files(struct dentry *root)
{
{
	int i;
	int i;


@@ -42,16 +42,16 @@ static int op_mips_create_files(struct super_block *sb, struct dentry *root)
		char buf[4];
		char buf[4];


		snprintf(buf, sizeof buf, "%d", i);
		snprintf(buf, sizeof buf, "%d", i);
		dir = oprofilefs_mkdir(sb, root, buf);
		dir = oprofilefs_mkdir(root, buf);


		oprofilefs_create_ulong(sb, dir, "enabled", &ctr[i].enabled);
		oprofilefs_create_ulong(dir, "enabled", &ctr[i].enabled);
		oprofilefs_create_ulong(sb, dir, "event", &ctr[i].event);
		oprofilefs_create_ulong(dir, "event", &ctr[i].event);
		oprofilefs_create_ulong(sb, dir, "count", &ctr[i].count);
		oprofilefs_create_ulong(dir, "count", &ctr[i].count);
		oprofilefs_create_ulong(sb, dir, "kernel", &ctr[i].kernel);
		oprofilefs_create_ulong(dir, "kernel", &ctr[i].kernel);
		oprofilefs_create_ulong(sb, dir, "user", &ctr[i].user);
		oprofilefs_create_ulong(dir, "user", &ctr[i].user);
		oprofilefs_create_ulong(sb, dir, "exl", &ctr[i].exl);
		oprofilefs_create_ulong(dir, "exl", &ctr[i].exl);
		/* Dummy.  */
		/* Dummy.  */
		oprofilefs_create_ulong(sb, dir, "unit_mask", &ctr[i].unit_mask);
		oprofilefs_create_ulong(dir, "unit_mask", &ctr[i].unit_mask);
	}
	}


	return 0;
	return 0;
+10 −10
Original line number Original line Diff line number Diff line
@@ -825,39 +825,39 @@ static int kvm_vcpu_ioctl_enable_cap(struct kvm_vcpu *vcpu,
#endif
#endif
#ifdef CONFIG_KVM_MPIC
#ifdef CONFIG_KVM_MPIC
	case KVM_CAP_IRQ_MPIC: {
	case KVM_CAP_IRQ_MPIC: {
		struct file *filp;
		struct fd f;
		struct kvm_device *dev;
		struct kvm_device *dev;


		r = -EBADF;
		r = -EBADF;
		filp = fget(cap->args[0]);
		f = fdget(cap->args[0]);
		if (!filp)
		if (!f.file)
			break;
			break;


		r = -EPERM;
		r = -EPERM;
		dev = kvm_device_from_filp(filp);
		dev = kvm_device_from_filp(f.file);
		if (dev)
		if (dev)
			r = kvmppc_mpic_connect_vcpu(dev, vcpu, cap->args[1]);
			r = kvmppc_mpic_connect_vcpu(dev, vcpu, cap->args[1]);


		fput(filp);
		fdput(f);
		break;
		break;
	}
	}
#endif
#endif
#ifdef CONFIG_KVM_XICS
#ifdef CONFIG_KVM_XICS
	case KVM_CAP_IRQ_XICS: {
	case KVM_CAP_IRQ_XICS: {
		struct file *filp;
		struct fd f;
		struct kvm_device *dev;
		struct kvm_device *dev;


		r = -EBADF;
		r = -EBADF;
		filp = fget(cap->args[0]);
		f = fdget(cap->args[0]);
		if (!filp)
		if (!f.file)
			break;
			break;


		r = -EPERM;
		r = -EPERM;
		dev = kvm_device_from_filp(filp);
		dev = kvm_device_from_filp(f.file);
		if (dev)
		if (dev)
			r = kvmppc_xics_connect_vcpu(dev, vcpu, cap->args[1]);
			r = kvmppc_xics_connect_vcpu(dev, vcpu, cap->args[1]);


		fput(filp);
		fdput(f);
		break;
		break;
	}
	}
#endif /* CONFIG_KVM_XICS */
#endif /* CONFIG_KVM_XICS */
Loading