linux-next: manual merge of the vfs tree with Linus' tree

2020-07-27 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  arch/x86/kernel/fpu/xstate.c

between commit:

  5714ee50bb43 ("copy_xstate_to_kernel: Fix typo which caused GDB regression")

from Linus' tree and commit:

  0557d64d983e ("x86: switch to ->regset_get()")

from the vfs tree.

I fixed it up (I just used the latter as it included the former fix) and
can carry the fix as necessary. This is now fixed as far as linux-next
is concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpHrgkiiM9HS.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2020-07-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  arch/x86/kernel/fpu/xstate.c

between commit:

  5714ee50bb43 ("copy_xstate_to_kernel: Fix typo which caused GDB regression")

from Linus' tree and commit:

  c196049cc732 ("x86: switch to ->regset_get()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc arch/x86/kernel/fpu/xstate.c
index ad3a2b37927d,c80d4734c1f6..
--- a/arch/x86/kernel/fpu/xstate.c
+++ b/arch/x86/kernel/fpu/xstate.c
@@@ -1065,17 -1048,16 +1048,16 @@@ void copy_xstate_to_kernel(struct membu
header.xfeatures &= xfeatures_mask_user();
  
if (header.xfeatures & XFEATURE_MASK_FP)
-   copy_part(0, off_mxcsr,
- >i387, , _start, );
+   copy_part(, , 0, off_mxcsr, >i387);
if (header.xfeatures & (XFEATURE_MASK_SSE | XFEATURE_MASK_YMM))
-   copy_part(off_mxcsr, MXCSR_AND_FLAGS_SIZE,
- >i387.mxcsr, , _start, );
+   copy_part(, , off_mxcsr,
+ MXCSR_AND_FLAGS_SIZE, >i387.mxcsr);
if (header.xfeatures & XFEATURE_MASK_FP)
-   copy_part(offsetof(struct fxregs_state, st_space), 128,
- >i387.st_space, , _start, );
+   copy_part(, , offsetof(struct fxregs_state, st_space),
+ 128, >i387.st_space);
if (header.xfeatures & XFEATURE_MASK_SSE)
-   copy_part(xstate_offsets[XFEATURE_SSE], 256,
- >i387.xmm_space, , _start, );
 -  copy_part(, , xstate_offsets[XFEATURE_MASK_SSE],
++  copy_part(, , xstate_offsets[XFEATURE_SSE],
+ 256, >i387.xmm_space);
/*
 * Fill xsave->i387.sw_reserved value for ptrace frame:
 */


pgp7ddCW9bfkC.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2019-01-01 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  kernel/cgroup/cgroup-v1.c

between commit:

  3fc9c12d27b4 ("cgroup: Add named hierarchy disabling to cgroup_no_v1 boot 
param")

from Linus' tree and commit:

  b3678086951a ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context")

from the vfs tree.

Its a pity that the former commit did not appear until after the merge
window opened.  :-(

I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc kernel/cgroup/cgroup-v1.c
index 583b969b0c0e,4b189e821cad..
--- a/kernel/cgroup/cgroup-v1.c
+++ b/kernel/cgroup/cgroup-v1.c
@@@ -1003,17 -968,91 +971,94 @@@ int cgroup1_parse_param(struct fs_conte
continue;
  
/* Mutually exclusive option 'all' + subsystem name */
-   if (all_ss)
-   return -EINVAL;
-   opts->subsys_mask |= (1 << i);
-   one_ss = true;
+   if (ctx->all_ss)
+   return cg_invalf(fc, "cgroup1: subsys name 
conflicts with all");
+   ctx->subsys_mask |= (1 << i);
+   ctx->one_ss = true;
+   return 0;
+   }
  
-   break;
+   return cg_invalf(fc, "cgroup1: Unknown subsys name '%s'", 
param->key);
+   }
+   if (opt < 0)
+   return opt;
+ 
+   switch (opt) {
+   case Opt_none:
+   /* Explicitly have no subsystems */
+   ctx->none = true;
+   return 0;
+   case Opt_all:
+   /* Mutually exclusive option 'all' + subsystem name */
+   if (ctx->one_ss)
+   return cg_invalf(fc, "cgroup1: all conflicts with 
subsys name");
+   ctx->all_ss = true;
+   return 0;
+   case Opt_noprefix:
+   ctx->flags |= CGRP_ROOT_NOPREFIX;
+   return 0;
+   case Opt_clone_children:
+   ctx->cpuset_clone_children = true;
+   return 0;
+   case Opt_cpuset_v2_mode:
+   ctx->flags |= CGRP_ROOT_CPUSET_V2_MODE;
+   return 0;
+   case Opt_xattr:
+   ctx->flags |= CGRP_ROOT_XATTR;
+   return 0;
+   case Opt_release_agent:
+   /* Specifying two release agents is forbidden */
+   if (ctx->release_agent)
+   return cg_invalf(fc, "cgroup1: release_agent 
respecified");
+   ctx->release_agent = param->string;
+   param->string = NULL;
+   if (!ctx->release_agent)
+   return -ENOMEM;
+   return 0;
+ 
+   case Opt_name:
++  /* blocked by boot param? */
++  if (cgroup_no_v1_named)
++  return cg_invalf(fc, "cgroup1: Blocked by boot 
paramter");
+   /* Can't specify an empty name */
+   if (!param->size)
+   return cg_invalf(fc, "cgroup1: Empty name");
+   if (param->size > MAX_CGROUP_ROOT_NAMELEN - 1)
+   return cg_invalf(fc, "cgroup1: Name too long");
+   /* Must match [\w.-]+ */
+   for (i = 0; i < param->size; i++) {
+   char c = param->string[i];
+   if (isalnum(c))
+   continue;
+   if ((c == '.') || (c == '-') || (c == '_'))
+   continue;
+   return cg_invalf(fc, "cgroup1: Invalid name");
}
-   if (i == CGROUP_SUBSYS_COUNT)
-   return -ENOENT;
+   /* Specifying two names is forbidden */
+   if (ctx->name)
+   return cg_invalf(fc, "cgroup1: name respecified");
+   ctx->name = param->string;
+   param->string = NULL;
+   return 0;
}
  
+   return 0;
+ }
+ 
+ /*
+  * Validate the options that have been parsed.
+  */
+ static int cgroup1_validate(struct fs_context *fc)
+ {
+   struct cgroup_fs_context *ctx = cgroup_fc2context(fc);
+   struct cgroup_subsys *ss;
+   u16 mask = U16_MAX;
+   int i;
+ 
+ #ifdef CONFIG_CPUSETS
+   mask = ~((u16)1 << cpuset_cgrp_id);
+ #endif
+ 
/*
 * If the 'all' option was specified select all the subsystems,
 * otherwise if 'none', 'name=' and a subsystem name options were


pgplYLUup5Xjv.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2019-01-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got conflicts in:

  kernel/cgroup/cgroup.c

between commit:

  e250d91d6575 ("cgroup: fix parsing empty mount option string")

from Linus' tree and commit:

  b3678086951a ("kernfs, sysfs, cgroup, intel_rdt: Support fs_context")

from the vfs tree.

I fixed it up (I just used the vfs version) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


pgpB4dRZNLTOz.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2018-10-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/compat_ioctl.c

between commit:

  77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()")

from Linus' tree and commit:

  69374d063be0 ("compat_ioctl: remove pointless HCI... ioctls")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/compat_ioctl.c
index 6e30949d9f77,326ceab5246a..
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@@ -429,13 -499,68 +429,6 @@@ static int mt_ioctl_trans(struct file *
  
  #endif /* CONFIG_BLOCK */
  
- /* Bluetooth ioctls */
- #define HCIUARTSETPROTO   _IOW('U', 200, int)
- #define HCIUARTGETPROTO   _IOR('U', 201, int)
- #define HCIUARTGETDEVICE  _IOR('U', 202, int)
- #define HCIUARTSETFLAGS   _IOW('U', 203, int)
- #define HCIUARTGETFLAGS   _IOR('U', 204, int)
 -struct serial_struct32 {
 -compat_int_ttype;
 -compat_int_tline;
 -compat_uint_t   port;
 -compat_int_tirq;
 -compat_int_tflags;
 -compat_int_txmit_fifo_size;
 -compat_int_tcustom_divisor;
 -compat_int_tbaud_base;
 -unsigned short  close_delay;
 -chario_type;
 -charreserved_char[1];
 -compat_int_thub6;
 -unsigned short  closing_wait; /* time to wait before closing */
 -unsigned short  closing_wait2; /* no longer used... */
 -compat_uint_t   iomem_base;
 -unsigned short  iomem_reg_shift;
 -unsigned intport_high;
 - /* compat_ulong_t  iomap_base FIXME */
 -compat_int_treserved[1];
 -};
 -
 -static int serial_struct_ioctl(struct file *file,
 -  unsigned cmd, struct serial_struct32 __user *ss32)
 -{
 -typedef struct serial_struct32 SS32;
 -int err;
 -  struct serial_struct __user *ss = compat_alloc_user_space(sizeof(*ss));
 -__u32 udata;
 -  unsigned int base;
 -  unsigned char *iomem_base;
 -
 -  if (ss == NULL)
 -  return -EFAULT;
 -if (cmd == TIOCSSERIAL) {
 -  if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
 -  get_user(udata, >iomem_base))
 -  return -EFAULT;
 -  iomem_base = compat_ptr(udata);
 -  if (put_user(iomem_base, >iomem_base) ||
 -  convert_in_user(>iomem_reg_shift,
 ->iomem_reg_shift) ||
 -  convert_in_user(>port_high, >port_high) ||
 -  put_user(0UL, >iomap_base))
 -  return -EFAULT;
 -}
 -  err = do_ioctl(file, cmd, (unsigned long)ss);
 -if (cmd == TIOCGSERIAL && err >= 0) {
 -  if (copy_in_user(ss32, ss, offsetof(SS32, iomem_base)) ||
 -  get_user(iomem_base, >iomem_base))
 -  return -EFAULT;
 -  base = (unsigned long)iomem_base  >> 32 ?
 -  0x : (unsigned)(unsigned long)iomem_base;
 -  if (put_user(base, >iomem_base) ||
 -  convert_in_user(>iomem_reg_shift,
 ->iomem_reg_shift) ||
 -  convert_in_user(>port_high, >port_high))
 -  return -EFAULT;
 -}
 -return err;
 -}
--
  #define RTC_IRQP_READ32   _IOR('p', 0x0b, compat_ulong_t)
  #define RTC_IRQP_SET32_IOW('p', 0x0c, compat_ulong_t)
  #define RTC_EPOCH_READ32  _IOR('p', 0x0d, compat_ulong_t)


pgpemguebeHG1.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2018-10-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/compat_ioctl.c

between commit:

  77654350306a ("take compat TIOC[SG]SERIAL treatment into tty_compat_ioctl()")

from Linus' tree and commit:

  69374d063be0 ("compat_ioctl: remove pointless HCI... ioctls")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/compat_ioctl.c
index 6e30949d9f77,326ceab5246a..
--- a/fs/compat_ioctl.c
+++ b/fs/compat_ioctl.c
@@@ -429,13 -499,68 +429,6 @@@ static int mt_ioctl_trans(struct file *
  
  #endif /* CONFIG_BLOCK */
  
- /* Bluetooth ioctls */
- #define HCIUARTSETPROTO   _IOW('U', 200, int)
- #define HCIUARTGETPROTO   _IOR('U', 201, int)
- #define HCIUARTGETDEVICE  _IOR('U', 202, int)
- #define HCIUARTSETFLAGS   _IOW('U', 203, int)
- #define HCIUARTGETFLAGS   _IOR('U', 204, int)
 -struct serial_struct32 {
 -compat_int_ttype;
 -compat_int_tline;
 -compat_uint_t   port;
 -compat_int_tirq;
 -compat_int_tflags;
 -compat_int_txmit_fifo_size;
 -compat_int_tcustom_divisor;
 -compat_int_tbaud_base;
 -unsigned short  close_delay;
 -chario_type;
 -charreserved_char[1];
 -compat_int_thub6;
 -unsigned short  closing_wait; /* time to wait before closing */
 -unsigned short  closing_wait2; /* no longer used... */
 -compat_uint_t   iomem_base;
 -unsigned short  iomem_reg_shift;
 -unsigned intport_high;
 - /* compat_ulong_t  iomap_base FIXME */
 -compat_int_treserved[1];
 -};
 -
 -static int serial_struct_ioctl(struct file *file,
 -  unsigned cmd, struct serial_struct32 __user *ss32)
 -{
 -typedef struct serial_struct32 SS32;
 -int err;
 -  struct serial_struct __user *ss = compat_alloc_user_space(sizeof(*ss));
 -__u32 udata;
 -  unsigned int base;
 -  unsigned char *iomem_base;
 -
 -  if (ss == NULL)
 -  return -EFAULT;
 -if (cmd == TIOCSSERIAL) {
 -  if (copy_in_user(ss, ss32, offsetof(SS32, iomem_base)) ||
 -  get_user(udata, >iomem_base))
 -  return -EFAULT;
 -  iomem_base = compat_ptr(udata);
 -  if (put_user(iomem_base, >iomem_base) ||
 -  convert_in_user(>iomem_reg_shift,
 ->iomem_reg_shift) ||
 -  convert_in_user(>port_high, >port_high) ||
 -  put_user(0UL, >iomap_base))
 -  return -EFAULT;
 -}
 -  err = do_ioctl(file, cmd, (unsigned long)ss);
 -if (cmd == TIOCGSERIAL && err >= 0) {
 -  if (copy_in_user(ss32, ss, offsetof(SS32, iomem_base)) ||
 -  get_user(iomem_base, >iomem_base))
 -  return -EFAULT;
 -  base = (unsigned long)iomem_base  >> 32 ?
 -  0x : (unsigned)(unsigned long)iomem_base;
 -  if (put_user(base, >iomem_base) ||
 -  convert_in_user(>iomem_reg_shift,
 ->iomem_reg_shift) ||
 -  convert_in_user(>port_high, >port_high))
 -  return -EFAULT;
 -}
 -return err;
 -}
--
  #define RTC_IRQP_READ32   _IOR('p', 0x0b, compat_ulong_t)
  #define RTC_IRQP_SET32_IOW('p', 0x0c, compat_ulong_t)
  #define RTC_EPOCH_READ32  _IOR('p', 0x0d, compat_ulong_t)


pgpemguebeHG1.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2018-05-31 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/afs/fsclient.c

between commit:

  684b0f68cf1c ("afs: Fix AFSFetchStatus decoder to provide OpenAFS 
compatibility")

from Linus' tree and commit:

  c875c76a061d ("afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/afs/fsclient.c
index b273e1d60478,b695d9e16c65..
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@@ -138,37 -137,14 +138,31 @@@ static int xdr_decode_AFSFetchStatus(st
u64 data_version, size;
u32 type, abort_code;
u8 flags = 0;
-   int ret;
- 
-   if (vnode)
-   write_seqlock(>cb_lock);
  
 +  abort_code = ntohl(xdr->abort_code);
 +
if (xdr->if_version != htonl(AFS_FSTATUS_VERSION)) {
 +  if (xdr->if_version == htonl(0) &&
 +  abort_code != 0 &&
 +  inline_error) {
 +  /* The OpenAFS fileserver has a bug in 
FS.InlineBulkStatus
 +   * whereby it doesn't set the interface version in the 
error
 +   * case.
 +   */
 +  status->abort_code = abort_code;
-   ret = 0;
-   goto out;
++  return 0;
 +  }
 +
pr_warn("Unknown AFSFetchStatus version %u\n", 
ntohl(xdr->if_version));
goto bad;
}
  
 +  if (abort_code != 0 && inline_error) {
 +  status->abort_code = abort_code;
-   ret = 0;
-   goto out;
++  return 0;
 +  }
 +
type = ntohl(xdr->type);
 -  abort_code = ntohl(xdr->abort_code);
switch (type) {
case AFS_FTYPE_FILE:
case AFS_FTYPE_DIR:


pgp6oAILUkEmO.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2018-05-31 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/afs/fsclient.c

between commit:

  684b0f68cf1c ("afs: Fix AFSFetchStatus decoder to provide OpenAFS 
compatibility")

from Linus' tree and commit:

  c875c76a061d ("afs: Fix a Sparse warning in xdr_decode_AFSFetchStatus()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/afs/fsclient.c
index b273e1d60478,b695d9e16c65..
--- a/fs/afs/fsclient.c
+++ b/fs/afs/fsclient.c
@@@ -138,37 -137,14 +138,31 @@@ static int xdr_decode_AFSFetchStatus(st
u64 data_version, size;
u32 type, abort_code;
u8 flags = 0;
-   int ret;
- 
-   if (vnode)
-   write_seqlock(>cb_lock);
  
 +  abort_code = ntohl(xdr->abort_code);
 +
if (xdr->if_version != htonl(AFS_FSTATUS_VERSION)) {
 +  if (xdr->if_version == htonl(0) &&
 +  abort_code != 0 &&
 +  inline_error) {
 +  /* The OpenAFS fileserver has a bug in 
FS.InlineBulkStatus
 +   * whereby it doesn't set the interface version in the 
error
 +   * case.
 +   */
 +  status->abort_code = abort_code;
-   ret = 0;
-   goto out;
++  return 0;
 +  }
 +
pr_warn("Unknown AFSFetchStatus version %u\n", 
ntohl(xdr->if_version));
goto bad;
}
  
 +  if (abort_code != 0 && inline_error) {
 +  status->abort_code = abort_code;
-   ret = 0;
-   goto out;
++  return 0;
 +  }
 +
type = ntohl(xdr->type);
 -  abort_code = ntohl(xdr->abort_code);
switch (type) {
case AFS_FTYPE_FILE:
case AFS_FTYPE_DIR:


pgp6oAILUkEmO.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2018-01-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  ipc/mqueue.c

between commit:

  1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")

from Linus' tree and commit:

  946086abeddf ("mqueue: switch to on-demand creation of internal mount")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2018-01-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  ipc/mqueue.c

between commit:

  1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")

from Linus' tree and commit:

  946086abeddf ("mqueue: switch to on-demand creation of internal mount")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-12-03 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/net/ethernet/via/via-rhine.c

between commit:

  a7e4fbbfdf79 ("net: via: via-rhine: use %p to format void * address instead 
of %x")

from Linus' tree and commit:

  68fef306c2a5 ("via: trivial sparse annotations")

from the vfs tree.

I fixed it up (I used the version of the netdev_info line change from
Linus' tree) and can carry the fix as necessary. This is now fixed as
far as linux-next is concerned, but any non trivial conflicts should be
mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-12-03 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/net/ethernet/via/via-rhine.c

between commit:

  a7e4fbbfdf79 ("net: via: via-rhine: use %p to format void * address instead 
of %x")

from Linus' tree and commit:

  68fef306c2a5 ("via: trivial sparse annotations")

from the vfs tree.

I fixed it up (I used the version of the netdev_info line change from
Linus' tree) and can carry the fix as necessary. This is now fixed as
far as linux-next is concerned, but any non trivial conflicts should be
mentioned to your upstream maintainer when your tree is submitted for
merging.  You may also want to consider cooperating with the maintainer
of the conflicting tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the vfs tree with Linus' tree

2017-11-30 Thread Stephen Rothwell
Hi Al,

On Wed, 29 Nov 2017 10:53:29 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the vfs tree got conflicts in several files
> due to commit:
> 
>   1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")
> 
> from Linus' tree and commit:
> 
>   c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
> generally")
> 
> from the vfs tree.
> 
> I just dropped the vfs tree for today, can you please clean it up?

Ping?
-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the vfs tree with Linus' tree

2017-11-30 Thread Stephen Rothwell
Hi Al,

On Wed, 29 Nov 2017 10:53:29 +1100 Stephen Rothwell  
wrote:
>
> Today's linux-next merge of the vfs tree got conflicts in several files
> due to commit:
> 
>   1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")
> 
> from Linus' tree and commit:
> 
>   c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
> generally")
> 
> from the vfs tree.
> 
> I just dropped the vfs tree for today, can you please clean it up?

Ping?
-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-11-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got conflicts in several files
due to commit:

  1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")

from Linus' tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I just dropped the vfs tree for today, can you please clean it up?

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-11-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got conflicts in several files
due to commit:

  1751e8a6cb93 ("Rename superblock flags (MS_xyz -> SB_xyz)")

from Linus' tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I just dropped the vfs tree for today, can you please clean it up?

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-11-16 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/afs/super.c

between commits:

  f044c8847bb6 ("afs: Lay the groundwork for supporting network namespaces")
  49566f6f06b3 ("afs: Note the cell in the superblock info also")

from Linus' tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

P.S. Dave, do you feel like having an afs tree in linux-next for next time?
-- 
Cheers,
Stephen Rothwell

diff --cc fs/afs/super.c
index 875b5eb02242,a8c1e00c4dd0..
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@@ -493,19 -465,20 +493,19 @@@ static struct dentry *afs_mount(struct 
/* initial superblock/root creation */
_debug("create");
ret = afs_fill_super(sb, );
 -  if (ret < 0) {
 -  deactivate_locked_super(sb);
 -  goto error;
 -  }
 +  if (ret < 0)
 +  goto error_sb;
 +  as = NULL;
-   sb->s_flags |= MS_ACTIVE;
+   sb->s_flags |= SB_ACTIVE;
} else {
_debug("reuse");
-   ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
+   ASSERTCMP(sb->s_flags, &, SB_ACTIVE);
 -  afs_put_volume(vol);
 -  kfree(as);
 +  afs_destroy_sbi(as);
 +  as = NULL;
}
  
 -  afs_put_cell(params.cell);
 -  kfree(new_opts);
 +  afs_put_cell(params.net, params.cell);
 +  key_put(params.key);
_leave(" = 0 [%p]", sb);
return dget(sb->s_root);
  


linux-next: manual merge of the vfs tree with Linus' tree

2017-11-16 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/afs/super.c

between commits:

  f044c8847bb6 ("afs: Lay the groundwork for supporting network namespaces")
  49566f6f06b3 ("afs: Note the cell in the superblock info also")

from Linus' tree and commit:

  c2c6773f9942 ("VFS: Roll out mount flag differentiation (MS_* -> SB_*) 
generally")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

P.S. Dave, do you feel like having an afs tree in linux-next for next time?
-- 
Cheers,
Stephen Rothwell

diff --cc fs/afs/super.c
index 875b5eb02242,a8c1e00c4dd0..
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@@ -493,19 -465,20 +493,19 @@@ static struct dentry *afs_mount(struct 
/* initial superblock/root creation */
_debug("create");
ret = afs_fill_super(sb, );
 -  if (ret < 0) {
 -  deactivate_locked_super(sb);
 -  goto error;
 -  }
 +  if (ret < 0)
 +  goto error_sb;
 +  as = NULL;
-   sb->s_flags |= MS_ACTIVE;
+   sb->s_flags |= SB_ACTIVE;
} else {
_debug("reuse");
-   ASSERTCMP(sb->s_flags, &, MS_ACTIVE);
+   ASSERTCMP(sb->s_flags, &, SB_ACTIVE);
 -  afs_put_volume(vol);
 -  kfree(as);
 +  afs_destroy_sbi(as);
 +  as = NULL;
}
  
 -  afs_put_cell(params.cell);
 -  kfree(new_opts);
 +  afs_put_cell(params.net, params.cell);
 +  key_put(params.key);
_leave(" = 0 [%p]", sb);
return dget(sb->s_root);
  


linux-next: manual merge of the vfs tree with Linus' tree

2017-03-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/block/nbd.c

between commit:

  9dd5d3ab49f7 ("nbd: handle ERESTARTSYS properly")

from Linus' tree and commit:

  7c09d0a53c27 ("backmerge of nbd.c changes, resolving conflicts")

from the vfs tree.

I fixed it up (I used the former change) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

Its probably time that the vfs tree was cleaned up after the last merge
window.
-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2017-03-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/block/nbd.c

between commit:

  9dd5d3ab49f7 ("nbd: handle ERESTARTSYS properly")

from Linus' tree and commit:

  7c09d0a53c27 ("backmerge of nbd.c changes, resolving conflicts")

from the vfs tree.

I fixed it up (I used the former change) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging.  You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.

Its probably time that the vfs tree was cleaned up after the last merge
window.
-- 
Cheers,
Stephen Rothwell


Re: linux-next: manual merge of the vfs tree with Linus' tree

2017-02-27 Thread David Howells
Stephen Rothwell  wrote:

> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/proc/base.c
> 
> between commit:
> 
>   68eb94f16227 ("proc: Better ownership of files for non-dumpable tasks in 
> user namespaces")
> 
> from Linus' tree and commit:
> 
>   caffc373c573 ("statx: Add a system call to make enhanced file info 
> available")
> 
> from the vfs tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc fs/proc/base.c
> index b8f06273353e,b5a5d3cab358..
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@@ -1724,11 -1711,13 +1724,12 @@@ out_unlock
>   return NULL;
>   }
>   
> - int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
> *stat)
> + int pid_getattr(const struct path *path, struct kstat *stat,
> + u32 request_mask, unsigned int query_flags)
>   {
> - struct inode *inode = d_inode(dentry);
> + struct inode *inode = d_inode(path->dentry);
>   struct task_struct *task;
> - struct pid_namespace *pid = dentry->d_sb->s_fs_info;
>  -const struct cred *cred;
> + struct pid_namespace *pid = path->dentry->d_sb->s_fs_info;
>   
>   generic_fillattr(inode, stat);
>   

Reviewed-by: David Howells 


Re: linux-next: manual merge of the vfs tree with Linus' tree

2017-02-27 Thread David Howells
Stephen Rothwell  wrote:

> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/proc/base.c
> 
> between commit:
> 
>   68eb94f16227 ("proc: Better ownership of files for non-dumpable tasks in 
> user namespaces")
> 
> from Linus' tree and commit:
> 
>   caffc373c573 ("statx: Add a system call to make enhanced file info 
> available")
> 
> from the vfs tree.
> 
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc fs/proc/base.c
> index b8f06273353e,b5a5d3cab358..
> --- a/fs/proc/base.c
> +++ b/fs/proc/base.c
> @@@ -1724,11 -1711,13 +1724,12 @@@ out_unlock
>   return NULL;
>   }
>   
> - int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
> *stat)
> + int pid_getattr(const struct path *path, struct kstat *stat,
> + u32 request_mask, unsigned int query_flags)
>   {
> - struct inode *inode = d_inode(dentry);
> + struct inode *inode = d_inode(path->dentry);
>   struct task_struct *task;
> - struct pid_namespace *pid = dentry->d_sb->s_fs_info;
>  -const struct cred *cred;
> + struct pid_namespace *pid = path->dentry->d_sb->s_fs_info;
>   
>   generic_fillattr(inode, stat);
>   

Reviewed-by: David Howells 


linux-next: manual merge of the vfs tree with Linus' tree

2017-02-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/proc/base.c

between commit:

  68eb94f16227 ("proc: Better ownership of files for non-dumpable tasks in user 
namespaces")

from Linus' tree and commit:

  caffc373c573 ("statx: Add a system call to make enhanced file info available")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/proc/base.c
index b8f06273353e,b5a5d3cab358..
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@@ -1724,11 -1711,13 +1724,12 @@@ out_unlock
return NULL;
  }
  
- int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
*stat)
+ int pid_getattr(const struct path *path, struct kstat *stat,
+   u32 request_mask, unsigned int query_flags)
  {
-   struct inode *inode = d_inode(dentry);
+   struct inode *inode = d_inode(path->dentry);
struct task_struct *task;
-   struct pid_namespace *pid = dentry->d_sb->s_fs_info;
 -  const struct cred *cred;
+   struct pid_namespace *pid = path->dentry->d_sb->s_fs_info;
  
generic_fillattr(inode, stat);
  


linux-next: manual merge of the vfs tree with Linus' tree

2017-02-26 Thread Stephen Rothwell
Hi all,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/proc/base.c

between commit:

  68eb94f16227 ("proc: Better ownership of files for non-dumpable tasks in user 
namespaces")

from Linus' tree and commit:

  caffc373c573 ("statx: Add a system call to make enhanced file info available")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/proc/base.c
index b8f06273353e,b5a5d3cab358..
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@@ -1724,11 -1711,13 +1724,12 @@@ out_unlock
return NULL;
  }
  
- int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
*stat)
+ int pid_getattr(const struct path *path, struct kstat *stat,
+   u32 request_mask, unsigned int query_flags)
  {
-   struct inode *inode = d_inode(dentry);
+   struct inode *inode = d_inode(path->dentry);
struct task_struct *task;
-   struct pid_namespace *pid = dentry->d_sb->s_fs_info;
 -  const struct cred *cred;
+   struct pid_namespace *pid = path->dentry->d_sb->s_fs_info;
  
generic_fillattr(inode, stat);
  


linux-next: manual merge of the vfs tree with Linus' tree

2017-01-22 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/block/nbd.c

between commit:

  d61b7f972dab ("nbd: only set MSG_MORE when we have more to send")

from Linus' tree and commit:

  c9f2b6aeb922 ("[nbd] pass iov_iter to nbd_xmit()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/block/nbd.c
index 9fd06eeb1a17,3c2dbe412c02..
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@@ -271,8 -256,10 +256,10 @@@ static int sock_xmit(struct nbd_device 
  static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int 
index)
  {
struct request *req = blk_mq_rq_from_pdu(cmd);
 -  int result, flags;
 +  int result;
-   struct nbd_request request;
+   struct nbd_request request = {.magic = htonl(NBD_REQUEST_MAGIC)};
+   struct kvec iov = {.iov_base = , .iov_len = sizeof(request)};
+   struct iov_iter from;
unsigned long size = blk_rq_bytes(req);
struct bio *bio;
u32 type;
@@@ -318,11 -306,14 +305,13 @@@
  
bio_for_each_segment(bvec, bio, iter) {
bool is_last = !next && bio_iter_last(bvec, iter);
 +  int flags = is_last ? 0 : MSG_MORE;
  
 -  if (is_last)
 -  flags = MSG_MORE;
dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes 
data\n",
cmd, bvec.bv_len);
-   result = sock_send_bvec(nbd, index, , flags);
+   iov_iter_bvec(, ITER_BVEC | WRITE,
+ , 1, bvec.bv_len);
+   result = sock_xmit(nbd, index, 1, , flags);
if (result <= 0) {
dev_err(disk_to_dev(nbd->disk),
"Send data failed (result %d)\n",


linux-next: manual merge of the vfs tree with Linus' tree

2017-01-22 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  drivers/block/nbd.c

between commit:

  d61b7f972dab ("nbd: only set MSG_MORE when we have more to send")

from Linus' tree and commit:

  c9f2b6aeb922 ("[nbd] pass iov_iter to nbd_xmit()")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc drivers/block/nbd.c
index 9fd06eeb1a17,3c2dbe412c02..
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@@ -271,8 -256,10 +256,10 @@@ static int sock_xmit(struct nbd_device 
  static int nbd_send_cmd(struct nbd_device *nbd, struct nbd_cmd *cmd, int 
index)
  {
struct request *req = blk_mq_rq_from_pdu(cmd);
 -  int result, flags;
 +  int result;
-   struct nbd_request request;
+   struct nbd_request request = {.magic = htonl(NBD_REQUEST_MAGIC)};
+   struct kvec iov = {.iov_base = , .iov_len = sizeof(request)};
+   struct iov_iter from;
unsigned long size = blk_rq_bytes(req);
struct bio *bio;
u32 type;
@@@ -318,11 -306,14 +305,13 @@@
  
bio_for_each_segment(bvec, bio, iter) {
bool is_last = !next && bio_iter_last(bvec, iter);
 +  int flags = is_last ? 0 : MSG_MORE;
  
 -  if (is_last)
 -  flags = MSG_MORE;
dev_dbg(nbd_to_dev(nbd), "request %p: sending %d bytes 
data\n",
cmd, bvec.bv_len);
-   result = sock_send_bvec(nbd, index, , flags);
+   iov_iter_bvec(, ITER_BVEC | WRITE,
+ , 1, bvec.bv_len);
+   result = sock_xmit(nbd, index, 1, , flags);
if (result <= 0) {
dev_err(disk_to_dev(nbd->disk),
"Send data failed (result %d)\n",


linux-next: manual merge of the vfs tree with Linus' tree

2016-10-09 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/fuse/dir.c

between commits:

  5e2b8828ff3d ("fuse: invalidate dir dentry after chmod")
  a09f99eddef4 ("fuse: fix killing s[ug]id in setattr")
  5e940c1dd3c1 ("fuse: handle killpriv in userspace fs")
  60bcc88ad185 ("fuse: Add posix ACL support")

from Linus' tree and commit:

  62490330769c ("fuse: Propagate dentry down to inode_change_ok()")
  fd50ecaddf83 ("vfs: Remove {get,set,remove}xattr inode operations")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/fuse/dir.c
index f7c84ab835ca,009f68e979e2..
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@@ -1618,10 -1607,10 +1619,10 @@@ int fuse_do_setattr(struct dentry *dent
int err;
bool trust_local_cmtime = is_wb && S_ISREG(inode->i_mode);
  
 -  if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS))
 +  if (!fc->default_permissions)
attr->ia_valid |= ATTR_FORCE;
  
-   err = inode_change_ok(inode, attr);
+   err = setattr_prepare(dentry, attr);
if (err)
return err;
  
@@@ -1722,56 -1708,10 +1723,56 @@@ static int fuse_setattr(struct dentry *
if (!fuse_allow_current_process(get_fuse_conn(inode)))
return -EACCES;
  
 -  if (attr->ia_valid & ATTR_FILE)
 -  return fuse_do_setattr(entry, attr, attr->ia_file);
 -  else
 -  return fuse_do_setattr(entry, attr, NULL);
 +  if (attr->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) {
 +  attr->ia_valid &= ~(ATTR_KILL_SUID | ATTR_KILL_SGID |
 +  ATTR_MODE);
 +
 +  /*
 +   * The only sane way to reliably kill suid/sgid is to do it in
 +   * the userspace filesystem
 +   *
 +   * This should be done on write(), truncate() and chown().
 +   */
 +  if (!fc->handle_killpriv) {
 +  int kill;
 +
 +  /*
 +   * ia_mode calculation may have used stale i_mode.
 +   * Refresh and recalculate.
 +   */
 +  ret = fuse_do_getattr(inode, NULL, file);
 +  if (ret)
 +  return ret;
 +
 +  attr->ia_mode = inode->i_mode;
 +  kill = should_remove_suid(entry);
 +  if (kill & ATTR_KILL_SUID) {
 +  attr->ia_valid |= ATTR_MODE;
 +  attr->ia_mode &= ~S_ISUID;
 +  }
 +  if (kill & ATTR_KILL_SGID) {
 +  attr->ia_valid |= ATTR_MODE;
 +  attr->ia_mode &= ~S_ISGID;
 +  }
 +  }
 +  }
 +  if (!attr->ia_valid)
 +  return 0;
 +
-   ret = fuse_do_setattr(inode, attr, file);
++  ret = fuse_do_setattr(entry, attr, file);
 +  if (!ret) {
 +  /*
 +   * If filesystem supports acls it may have updated acl xattrs in
 +   * the filesystem, so forget cached acls for the inode.
 +   */
 +  if (fc->posix_acl)
 +  forget_all_cached_acls(inode);
 +
 +  /* Directory mode changed, may need to revalidate access */
 +  if (d_is_dir(entry) && (attr->ia_valid & ATTR_MODE))
 +  fuse_invalidate_entry_cache(entry);
 +  }
 +  return ret;
  }
  
  static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
@@@ -1800,12 -1740,7 +1801,9 @@@ static const struct inode_operations fu
.mknod  = fuse_mknod,
.permission = fuse_permission,
.getattr= fuse_getattr,
-   .setxattr   = generic_setxattr,
-   .getxattr   = generic_getxattr,
.listxattr  = fuse_listxattr,
-   .removexattr= generic_removexattr,
 +  .get_acl= fuse_get_acl,
 +  .set_acl= fuse_set_acl,
  };
  
  static const struct file_operations fuse_dir_operations = {
@@@ -1823,12 -1758,7 +1821,9 @@@ static const struct inode_operations fu
.setattr= fuse_setattr,
.permission = fuse_permission,
.getattr= fuse_getattr,
-   .setxattr   = generic_setxattr,
-   .getxattr   = generic_getxattr,
.listxattr  = fuse_listxattr,
-   .removexattr= generic_removexattr,
 +  .get_acl= fuse_get_acl,
 +  .set_acl= fuse_set_acl,
  };
  
  static const struct 

linux-next: manual merge of the vfs tree with Linus' tree

2016-10-09 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/fuse/dir.c

between commits:

  5e2b8828ff3d ("fuse: invalidate dir dentry after chmod")
  a09f99eddef4 ("fuse: fix killing s[ug]id in setattr")
  5e940c1dd3c1 ("fuse: handle killpriv in userspace fs")
  60bcc88ad185 ("fuse: Add posix ACL support")

from Linus' tree and commit:

  62490330769c ("fuse: Propagate dentry down to inode_change_ok()")
  fd50ecaddf83 ("vfs: Remove {get,set,remove}xattr inode operations")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/fuse/dir.c
index f7c84ab835ca,009f68e979e2..
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@@ -1618,10 -1607,10 +1619,10 @@@ int fuse_do_setattr(struct dentry *dent
int err;
bool trust_local_cmtime = is_wb && S_ISREG(inode->i_mode);
  
 -  if (!(fc->flags & FUSE_DEFAULT_PERMISSIONS))
 +  if (!fc->default_permissions)
attr->ia_valid |= ATTR_FORCE;
  
-   err = inode_change_ok(inode, attr);
+   err = setattr_prepare(dentry, attr);
if (err)
return err;
  
@@@ -1722,56 -1708,10 +1723,56 @@@ static int fuse_setattr(struct dentry *
if (!fuse_allow_current_process(get_fuse_conn(inode)))
return -EACCES;
  
 -  if (attr->ia_valid & ATTR_FILE)
 -  return fuse_do_setattr(entry, attr, attr->ia_file);
 -  else
 -  return fuse_do_setattr(entry, attr, NULL);
 +  if (attr->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID)) {
 +  attr->ia_valid &= ~(ATTR_KILL_SUID | ATTR_KILL_SGID |
 +  ATTR_MODE);
 +
 +  /*
 +   * The only sane way to reliably kill suid/sgid is to do it in
 +   * the userspace filesystem
 +   *
 +   * This should be done on write(), truncate() and chown().
 +   */
 +  if (!fc->handle_killpriv) {
 +  int kill;
 +
 +  /*
 +   * ia_mode calculation may have used stale i_mode.
 +   * Refresh and recalculate.
 +   */
 +  ret = fuse_do_getattr(inode, NULL, file);
 +  if (ret)
 +  return ret;
 +
 +  attr->ia_mode = inode->i_mode;
 +  kill = should_remove_suid(entry);
 +  if (kill & ATTR_KILL_SUID) {
 +  attr->ia_valid |= ATTR_MODE;
 +  attr->ia_mode &= ~S_ISUID;
 +  }
 +  if (kill & ATTR_KILL_SGID) {
 +  attr->ia_valid |= ATTR_MODE;
 +  attr->ia_mode &= ~S_ISGID;
 +  }
 +  }
 +  }
 +  if (!attr->ia_valid)
 +  return 0;
 +
-   ret = fuse_do_setattr(inode, attr, file);
++  ret = fuse_do_setattr(entry, attr, file);
 +  if (!ret) {
 +  /*
 +   * If filesystem supports acls it may have updated acl xattrs in
 +   * the filesystem, so forget cached acls for the inode.
 +   */
 +  if (fc->posix_acl)
 +  forget_all_cached_acls(inode);
 +
 +  /* Directory mode changed, may need to revalidate access */
 +  if (d_is_dir(entry) && (attr->ia_valid & ATTR_MODE))
 +  fuse_invalidate_entry_cache(entry);
 +  }
 +  return ret;
  }
  
  static int fuse_getattr(struct vfsmount *mnt, struct dentry *entry,
@@@ -1800,12 -1740,7 +1801,9 @@@ static const struct inode_operations fu
.mknod  = fuse_mknod,
.permission = fuse_permission,
.getattr= fuse_getattr,
-   .setxattr   = generic_setxattr,
-   .getxattr   = generic_getxattr,
.listxattr  = fuse_listxattr,
-   .removexattr= generic_removexattr,
 +  .get_acl= fuse_get_acl,
 +  .set_acl= fuse_set_acl,
  };
  
  static const struct file_operations fuse_dir_operations = {
@@@ -1823,12 -1758,7 +1821,9 @@@ static const struct inode_operations fu
.setattr= fuse_setattr,
.permission = fuse_permission,
.getattr= fuse_getattr,
-   .setxattr   = generic_setxattr,
-   .getxattr   = generic_getxattr,
.listxattr  = fuse_listxattr,
-   .removexattr= generic_removexattr,
 +  .get_acl= fuse_get_acl,
 +  .set_acl= fuse_set_acl,
  };
  
  static const struct 

Re: linux-next: manual merge of the vfs tree with Linus' tree

2016-05-18 Thread Steve French
As noted below, it is easier to remove the obsolete comments and I
just pushed the following trivial patch to cifs-2.6.git for-next to do
that.

https://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=fea17ae8ac1c8c44b2fd1c02ae2e15b847d327d1



On Wed, May 18, 2016 at 8:17 PM, Stephen Rothwell  wrote:
> Hi Al,
>
> Today's linux-next merge of the vfs tree got a conflict in:
>
>   fs/cifs/cifsfs.c
>
> between commit:
>
>   a9ae008f407b ("cifs: Switch to generic xattr handlers")
>
> from Linus' tree and commit:
>
>   51085a1f913a ("cifs: use C99 syntax for inode_operations initializer")
>
> from the vfs tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> Al: the c99 fixup is not really necessary as the line is commented out
> and you didn't fix the one in the line above ... a better fix might be
> to delete both those lines?
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc fs/cifs/cifsfs.c
> index 67f622df0858,586d4eadd49e..
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@@ -917,11 -919,13 +917,11 @@@ const struct inode_operations cifs_syml
> .permission = cifs_permission,
> /* BB add the following two eventually */
> /* revalidate: cifs_revalidate,
> -  setattr:cifs_notify_change, *//* BB do we need notify change */
> +   .setattr = cifs_notify_change, *//* BB do we need notify change */
>  -#ifdef CONFIG_CIFS_XATTR
>  -  .setxattr = cifs_setxattr,
>  -  .getxattr = cifs_getxattr,
>  +  .setxattr = generic_setxattr,
>  +  .getxattr = generic_getxattr,
> .listxattr = cifs_listxattr,
>  -  .removexattr = cifs_removexattr,
>  -#endif
>  +  .removexattr = generic_removexattr,
>   };
>
>   static int cifs_clone_file_range(struct file *src_file, loff_t off,



-- 
Thanks,

Steve


Re: linux-next: manual merge of the vfs tree with Linus' tree

2016-05-18 Thread Steve French
As noted below, it is easier to remove the obsolete comments and I
just pushed the following trivial patch to cifs-2.6.git for-next to do
that.

https://git.samba.org/?p=sfrench/cifs-2.6.git;a=commit;h=fea17ae8ac1c8c44b2fd1c02ae2e15b847d327d1



On Wed, May 18, 2016 at 8:17 PM, Stephen Rothwell  wrote:
> Hi Al,
>
> Today's linux-next merge of the vfs tree got a conflict in:
>
>   fs/cifs/cifsfs.c
>
> between commit:
>
>   a9ae008f407b ("cifs: Switch to generic xattr handlers")
>
> from Linus' tree and commit:
>
>   51085a1f913a ("cifs: use C99 syntax for inode_operations initializer")
>
> from the vfs tree.
>
> I fixed it up (see below) and can carry the fix as necessary. This
> is now fixed as far as linux-next is concerned, but any non trivial
> conflicts should be mentioned to your upstream maintainer when your tree
> is submitted for merging.  You may also want to consider cooperating
> with the maintainer of the conflicting tree to minimise any particularly
> complex conflicts.
>
> Al: the c99 fixup is not really necessary as the line is commented out
> and you didn't fix the one in the line above ... a better fix might be
> to delete both those lines?
> --
> Cheers,
> Stephen Rothwell
>
> diff --cc fs/cifs/cifsfs.c
> index 67f622df0858,586d4eadd49e..
> --- a/fs/cifs/cifsfs.c
> +++ b/fs/cifs/cifsfs.c
> @@@ -917,11 -919,13 +917,11 @@@ const struct inode_operations cifs_syml
> .permission = cifs_permission,
> /* BB add the following two eventually */
> /* revalidate: cifs_revalidate,
> -  setattr:cifs_notify_change, *//* BB do we need notify change */
> +   .setattr = cifs_notify_change, *//* BB do we need notify change */
>  -#ifdef CONFIG_CIFS_XATTR
>  -  .setxattr = cifs_setxattr,
>  -  .getxattr = cifs_getxattr,
>  +  .setxattr = generic_setxattr,
>  +  .getxattr = generic_getxattr,
> .listxattr = cifs_listxattr,
>  -  .removexattr = cifs_removexattr,
>  -#endif
>  +  .removexattr = generic_removexattr,
>   };
>
>   static int cifs_clone_file_range(struct file *src_file, loff_t off,



-- 
Thanks,

Steve


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-18 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/cifs/cifsfs.c

between commit:

  a9ae008f407b ("cifs: Switch to generic xattr handlers")

from Linus' tree and commit:

  51085a1f913a ("cifs: use C99 syntax for inode_operations initializer")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

Al: the c99 fixup is not really necessary as the line is commented out
and you didn't fix the one in the line above ... a better fix might be
to delete both those lines?
-- 
Cheers,
Stephen Rothwell

diff --cc fs/cifs/cifsfs.c
index 67f622df0858,586d4eadd49e..
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@@ -917,11 -919,13 +917,11 @@@ const struct inode_operations cifs_syml
.permission = cifs_permission,
/* BB add the following two eventually */
/* revalidate: cifs_revalidate,
-  setattr:cifs_notify_change, *//* BB do we need notify change */
+   .setattr = cifs_notify_change, *//* BB do we need notify change */
 -#ifdef CONFIG_CIFS_XATTR
 -  .setxattr = cifs_setxattr,
 -  .getxattr = cifs_getxattr,
 +  .setxattr = generic_setxattr,
 +  .getxattr = generic_getxattr,
.listxattr = cifs_listxattr,
 -  .removexattr = cifs_removexattr,
 -#endif
 +  .removexattr = generic_removexattr,
  };
  
  static int cifs_clone_file_range(struct file *src_file, loff_t off,


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-18 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/cifs/cifsfs.c

between commit:

  a9ae008f407b ("cifs: Switch to generic xattr handlers")

from Linus' tree and commit:

  51085a1f913a ("cifs: use C99 syntax for inode_operations initializer")

from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

Al: the c99 fixup is not really necessary as the line is commented out
and you didn't fix the one in the line above ... a better fix might be
to delete both those lines?
-- 
Cheers,
Stephen Rothwell

diff --cc fs/cifs/cifsfs.c
index 67f622df0858,586d4eadd49e..
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@@ -917,11 -919,13 +917,11 @@@ const struct inode_operations cifs_syml
.permission = cifs_permission,
/* BB add the following two eventually */
/* revalidate: cifs_revalidate,
-  setattr:cifs_notify_change, *//* BB do we need notify change */
+   .setattr = cifs_notify_change, *//* BB do we need notify change */
 -#ifdef CONFIG_CIFS_XATTR
 -  .setxattr = cifs_setxattr,
 -  .getxattr = cifs_getxattr,
 +  .setxattr = generic_setxattr,
 +  .getxattr = generic_getxattr,
.listxattr = cifs_listxattr,
 -  .removexattr = cifs_removexattr,
 -#endif
 +  .removexattr = generic_removexattr,
  };
  
  static int cifs_clone_file_range(struct file *src_file, loff_t off,


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/nfs/dir.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commit:

  586cf0326586 ("nfs: switch to ->iterate_shared()")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the latter vfs tree patch repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/nfs/dir.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commit:

  586cf0326586 ("nfs: switch to ->iterate_shared()")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the latter vfs tree patch repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/ecryptfs/mmap.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commits:

  ce23e6401334 ("->getxattr(): pass dentry and inode as separate arguments")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the latter vfs tree patch repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/ecryptfs/mmap.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commits:

  ce23e6401334 ("->getxattr(): pass dentry and inode as separate arguments")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the latter vfs tree patch repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.



-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/cifs/file.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commits:

  71335664c38f ("cifs: don't bother with kmap on read_pages side")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the vfs tree patches repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/cifs/file.c
index 489ddc797105,e013d64998d4..
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@@ -3311,16 -3302,12 +3302,12 @@@ cifs_readpages_read_into_pages(struct T
cifs_dbg(FYI, "eof=%llu eof_index=%lu\n", eof, eof_index);
  
rdata->got_bytes = 0;
 -  rdata->tailsz = PAGE_CACHE_SIZE;
 +  rdata->tailsz = PAGE_SIZE;
for (i = 0; i < nr_pages; i++) {
struct page *page = rdata->pages[i];
+   size_t n = PAGE_SIZE;
  
if (len >= PAGE_SIZE) {
-   /* enough data to fill the page */
-   iov.iov_base = kmap(page);
-   iov.iov_len = PAGE_SIZE;
-   cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
-i, page->index, iov.iov_base, iov.iov_len);
len -= PAGE_SIZE;
} else if (len > 0) {
/* enough for partial page, fill and zero the rest */


linux-next: manual merge of the vfs tree with Linus' tree

2016-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/cifs/file.c

between commit:

  09cbfeaf1a5a ("mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} 
macros")

from Linus' tree and commits:

  71335664c38f ("cifs: don't bother with kmap on read_pages side")
  7d2dbb9faf05 ("fixups for PAGE_CACHE_SIZE/page_cache_release-induced 
conflicts")

from the vfs tree.

I fixed it up (the vfs tree patches repeated the relevant parts of
the patch in Linus' tree, so I just used the vfs tree version) and can
carry the fix as necessary. This is now fixed as far as linux-next is
concerned, but any non trivial conflicts should be mentioned to your
upstream maintainer when your tree is submitted for merging.  You may
also want to consider cooperating with the maintainer of the conflicting
tree to minimise any particularly complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/cifs/file.c
index 489ddc797105,e013d64998d4..
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@@ -3311,16 -3302,12 +3302,12 @@@ cifs_readpages_read_into_pages(struct T
cifs_dbg(FYI, "eof=%llu eof_index=%lu\n", eof, eof_index);
  
rdata->got_bytes = 0;
 -  rdata->tailsz = PAGE_CACHE_SIZE;
 +  rdata->tailsz = PAGE_SIZE;
for (i = 0; i < nr_pages; i++) {
struct page *page = rdata->pages[i];
+   size_t n = PAGE_SIZE;
  
if (len >= PAGE_SIZE) {
-   /* enough data to fill the page */
-   iov.iov_base = kmap(page);
-   iov.iov_len = PAGE_SIZE;
-   cifs_dbg(FYI, "%u: idx=%lu iov_base=%p iov_len=%zu\n",
-i, page->index, iov.iov_base, iov.iov_len);
len -= PAGE_SIZE;
} else if (len > 0) {
/* enough for partial page, fill and zero the rest */


linux-next: manual merge of the vfs tree with Linus' tree

2016-03-13 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/nfs/nfs4proc.c

between commit:

  d9dfd8d74168 ("NFSv4: Fix a dentry leak on alias use")

from Linus' tree and commit:

  7635e19a39f6 ("replace d_add_unique() with saner primitive")

from the vfs tree.

I fixed it up (I just used the vfs tree version - thanks for the heads
up) and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2016-03-13 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

  fs/nfs/nfs4proc.c

between commit:

  d9dfd8d74168 ("NFSv4: Fix a dentry leak on alias use")

from Linus' tree and commit:

  7635e19a39f6 ("replace d_add_unique() with saner primitive")

from the vfs tree.

I fixed it up (I just used the vfs tree version - thanks for the heads
up) and can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwell


linux-next: manual merge of the vfs tree with Linus' tree

2015-12-06 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

fs/overlayfs/inode.c

between commit:

  0f7ff2dabbc9 ("ovl: get rid of the dead code left from broken (and disabled) 
optimizations")

from Linus' tree and commit:

  58809fadd08b ("broken permission checks in overlayfs ->setattr()")

from the vfs tree.

I fixed it up (I used the name ovl_copy_up_truncate from Linus' tree instead of 
ovl_copy_up_last) and can carry the fix as necessary (no action is required).
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the vfs tree with Linus' tree

2015-12-06 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in:

fs/overlayfs/inode.c

between commit:

  0f7ff2dabbc9 ("ovl: get rid of the dead code left from broken (and disabled) 
optimizations")

from Linus' tree and commit:

  58809fadd08b ("broken permission checks in overlayfs ->setattr()")

from the vfs tree.

I fixed it up (I used the name ovl_copy_up_truncate from Linus' tree instead of 
ovl_copy_up_last) and can carry the fix as necessary (no action is required).
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/write.c between commit d15bc38df607 ("nfs: Provide and use
helper functions for marking a page as unstable") from Linus' tree and
commit d92dd5c34974 ("VFS: (Scripted) Convert ->d_inode to fs_inode()
in fs/nfs/") from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgp84K2eNbKGR.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/flexfilelayout/flexfilelayout.c between commit d15bc38df607
("nfs: Provide and use helper functions for marking a page as
unstable") from Linus' tree and commit d92dd5c34974 ("VFS: (Scripted)
Convert ->d_inode to fs_inode() in fs/nfs/") from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpVpR6oEWpiX.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/filelayout/filelayout.c between commit 338d00cfef07 ("pnfs:
Refactor the *_layout_mark_request_commit to use
pnfs_layout_mark_request_commit") from Linus' tree and commit
d92dd5c34974 ("VFS: (Scripted) Convert ->d_inode to fs_inode() in
fs/nfs/") from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgprtdBgmeKPg.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/infiniband/hw/qib/qib_fs.c between commit 041af0bb765a
("IB/qib: Fix sizeof checkpatch warnings") from Linus' tree and commit
271b063723fd ("VFS: (Scripted) Convert ->d_inode to fs_inode() in
drivers/infiniband/hw/qib/qib_fs.c") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/infiniband/hw/qib/qib_fs.c
index 55f240a363fe,88cc9a288ccd..
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@@ -481,8 -481,8 +481,8 @@@ static int remove_device_files(struct s
int ret, i;
  
root = dget(sb->s_root);
-   mutex_lock(>d_inode->i_mutex);
+   mutex_lock(_inode(root)->i_mutex);
 -  snprintf(unit, sizeof unit, "%u", dd->unit);
 +  snprintf(unit, sizeof(unit), "%u", dd->unit);
dir = lookup_one_len(unit, root, strlen(unit));
  
if (IS_ERR(dir)) {


pgp4T2mr7cZp_.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/write.c between commit d15bc38df607 (nfs: Provide and use
helper functions for marking a page as unstable) from Linus' tree and
commit d92dd5c34974 (VFS: (Scripted) Convert -d_inode to fs_inode()
in fs/nfs/) from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgp84K2eNbKGR.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/infiniband/hw/qib/qib_fs.c between commit 041af0bb765a
(IB/qib: Fix sizeof checkpatch warnings) from Linus' tree and commit
271b063723fd (VFS: (Scripted) Convert -d_inode to fs_inode() in
drivers/infiniband/hw/qib/qib_fs.c) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/infiniband/hw/qib/qib_fs.c
index 55f240a363fe,88cc9a288ccd..
--- a/drivers/infiniband/hw/qib/qib_fs.c
+++ b/drivers/infiniband/hw/qib/qib_fs.c
@@@ -481,8 -481,8 +481,8 @@@ static int remove_device_files(struct s
int ret, i;
  
root = dget(sb-s_root);
-   mutex_lock(root-d_inode-i_mutex);
+   mutex_lock(fs_inode(root)-i_mutex);
 -  snprintf(unit, sizeof unit, %u, dd-unit);
 +  snprintf(unit, sizeof(unit), %u, dd-unit);
dir = lookup_one_len(unit, root, strlen(unit));
  
if (IS_ERR(dir)) {


pgp4T2mr7cZp_.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/filelayout/filelayout.c between commit 338d00cfef07 (pnfs:
Refactor the *_layout_mark_request_commit to use
pnfs_layout_mark_request_commit) from Linus' tree and commit
d92dd5c34974 (VFS: (Scripted) Convert -d_inode to fs_inode() in
fs/nfs/) from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgprtdBgmeKPg.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-02-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/nfs/flexfilelayout/flexfilelayout.c between commit d15bc38df607
(nfs: Provide and use helper functions for marking a page as
unstable) from Linus' tree and commit d92dd5c34974 (VFS: (Scripted)
Convert -d_inode to fs_inode() in fs/nfs/) from the vfs tree.

I fixed it up (the former removed the code modified by the latter) and
can carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpVpR6oEWpiX.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-01-22 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
kernel/auditsc.c between commit fcf22d8267ad ("audit: create private
file name copies when auditing inodes") from Linus' tree and various
commits from the vfs tree.

I fixed it up (I used the vfs tree version as advised by Al) and can
carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpAJajBiBIk8.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2015-01-22 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
kernel/auditsc.c between commit fcf22d8267ad (audit: create private
file name copies when auditing inodes) from Linus' tree and various
commits from the vfs tree.

I fixed it up (I used the vfs tree version as advised by Al) and can
carry the fix as necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpAJajBiBIk8.pgp
Description: OpenPGP digital signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-05-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/splice.c
between commitb6dd6f473883  ("vfs: fix vmplice_to_user()") from Linus'
tree and commit 71d8e532b154 ("start adding the tag to iov_iter") from
the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/splice.c
index e246954ea48c,9dc23de0f146..
--- a/fs/splice.c
+++ b/fs/splice.c
@@@ -1546,10 -1556,9 +1556,10 @@@ static long vmsplice_to_user(struct fil
ret = rw_copy_check_uvector(READ, uiov, nr_segs,
ARRAY_SIZE(iovstack), iovstack, );
if (ret <= 0)
 -  return ret;
 +  goto out;
  
 +  count = ret;
-   iov_iter_init(, iov, nr_segs, count, 0);
+   iov_iter_init(, READ, iov, nr_segs, count);
  
sd.len = 0;
sd.total_len = count;


signature.asc
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-05-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/splice.c
between commitb6dd6f473883  (vfs: fix vmplice_to_user()) from Linus'
tree and commit 71d8e532b154 (start adding the tag to iov_iter) from
the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/splice.c
index e246954ea48c,9dc23de0f146..
--- a/fs/splice.c
+++ b/fs/splice.c
@@@ -1546,10 -1556,9 +1556,10 @@@ static long vmsplice_to_user(struct fil
ret = rw_copy_check_uvector(READ, uiov, nr_segs,
ARRAY_SIZE(iovstack), iovstack, iov);
if (ret = 0)
 -  return ret;
 +  goto out;
  
 +  count = ret;
-   iov_iter_init(iter, iov, nr_segs, count, 0);
+   iov_iter_init(iter, READ, iov, nr_segs, count);
  
sd.len = 0;
sd.total_len = count;


signature.asc
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in mm/filemap.c
between commit b59b8cbca629 ("mm: fix new kernel-doc warning in
filemap.c") from Linus' tree and commit cbabd10029a4 ("write_iter
variants of {__,}generic_file_aio_write()") from the vfs tree.

I fixed it up (I used the vfs tree version) and can carry the fix as
necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpaX9KSATukR.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/cifs/file.c
between commit c11f1df5003d ("cifs: Wait for writebacks to complete
before attempting write") from Linus' tree and commit 30b11990262e
("cifs: switch to ->write_iter()") from the vfs tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/cifs/file.c
index 5ed03e0b8b40,bd6c36d005f3..
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@@ -2628,13 -2620,9 +2624,12 @@@ cifs_strict_writev(struct kiocb *iocb, 
if (CIFS_CACHE_WRITE(cinode)) {
if (cap_unix(tcon->ses) &&
(CIFS_UNIX_FCNTL_CAP & le64_to_cpu(tcon->fsUnixInfo.Capability))
 -  && ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0))
 -  return generic_file_write_iter(iocb, from);
 -  return cifs_writev(iocb, from);
 +&& ((cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NOPOSIXBRL) == 0)) {
-   written = generic_file_aio_write(
-   iocb, iov, nr_segs, pos);
++  written = generic_file_write_iter(iocb, from);
 +  goto out;
 +  }
-   written = cifs_writev(iocb, iov, nr_segs, pos);
++  written = cifs_writev(iocb, from);
 +  goto out;
}
/*
 * For non-oplocked files in strict cache mode we need to write the data


pgpKpiWx3fKO8.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/cifs/cifsfs.c between commit c11f1df5003d ("cifs: Wait for writebacks
to complete before attempting write") from Linus' tree and commit
30b11990262e ("cifs: switch to ->write_iter()") from the vfs tree.

I fixed it up (maybe - see below) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/cifs/cifsfs.c
index 5be1f997ecde,d101af8889fd..
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@@ -733,30 -728,22 +733,29 @@@ out_nls
goto out;
  }
  
- static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec 
*iov,
-  unsigned long nr_segs, loff_t pos)
+ static ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
  {
struct inode *inode = file_inode(iocb->ki_filp);
 +  struct cifsInodeInfo *cinode = CIFS_I(inode);
ssize_t written;
int rc;
  
 +  written = cifs_get_writer(cinode);
 +  if (written)
 +  return written;
 +
-   written = generic_file_aio_write(iocb, iov, nr_segs, pos);
+   written = generic_file_write_iter(iocb, from);
  
if (CIFS_CACHE_WRITE(CIFS_I(inode)))
 -  return written;
 +  goto out;
  
rc = filemap_fdatawrite(inode->i_mapping);
if (rc)
-   cifs_dbg(FYI, "cifs_file_aio_write: %d rc on %p inode\n",
+   cifs_dbg(FYI, "cifs_file_write_iter: %d rc on %p inode\n",
 rc, inode);
  
 +out:
 +  cifs_put_writer(cinode);
return written;
  }
  


pgpYKUE7qwGZR.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/cifs/cifsfs.c between commit c11f1df5003d (cifs: Wait for writebacks
to complete before attempting write) from Linus' tree and commit
30b11990262e (cifs: switch to -write_iter()) from the vfs tree.

I fixed it up (maybe - see below) and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/cifs/cifsfs.c
index 5be1f997ecde,d101af8889fd..
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@@ -733,30 -728,22 +733,29 @@@ out_nls
goto out;
  }
  
- static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec 
*iov,
-  unsigned long nr_segs, loff_t pos)
+ static ssize_t cifs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
  {
struct inode *inode = file_inode(iocb-ki_filp);
 +  struct cifsInodeInfo *cinode = CIFS_I(inode);
ssize_t written;
int rc;
  
 +  written = cifs_get_writer(cinode);
 +  if (written)
 +  return written;
 +
-   written = generic_file_aio_write(iocb, iov, nr_segs, pos);
+   written = generic_file_write_iter(iocb, from);
  
if (CIFS_CACHE_WRITE(CIFS_I(inode)))
 -  return written;
 +  goto out;
  
rc = filemap_fdatawrite(inode-i_mapping);
if (rc)
-   cifs_dbg(FYI, cifs_file_aio_write: %d rc on %p inode\n,
+   cifs_dbg(FYI, cifs_file_write_iter: %d rc on %p inode\n,
 rc, inode);
  
 +out:
 +  cifs_put_writer(cinode);
return written;
  }
  


pgpYKUE7qwGZR.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/cifs/file.c
between commit c11f1df5003d (cifs: Wait for writebacks to complete
before attempting write) from Linus' tree and commit 30b11990262e
(cifs: switch to -write_iter()) from the vfs tree.

I fixed it up (I think - see below) and can carry the fix as necessary
(no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/cifs/file.c
index 5ed03e0b8b40,bd6c36d005f3..
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@@ -2628,13 -2620,9 +2624,12 @@@ cifs_strict_writev(struct kiocb *iocb, 
if (CIFS_CACHE_WRITE(cinode)) {
if (cap_unix(tcon-ses) 
(CIFS_UNIX_FCNTL_CAP  le64_to_cpu(tcon-fsUnixInfo.Capability))
 -   ((cifs_sb-mnt_cifs_flags  CIFS_MOUNT_NOPOSIXBRL) == 0))
 -  return generic_file_write_iter(iocb, from);
 -  return cifs_writev(iocb, from);
 + ((cifs_sb-mnt_cifs_flags  CIFS_MOUNT_NOPOSIXBRL) == 0)) {
-   written = generic_file_aio_write(
-   iocb, iov, nr_segs, pos);
++  written = generic_file_write_iter(iocb, from);
 +  goto out;
 +  }
-   written = cifs_writev(iocb, iov, nr_segs, pos);
++  written = cifs_writev(iocb, from);
 +  goto out;
}
/*
 * For non-oplocked files in strict cache mode we need to write the data


pgpKpiWx3fKO8.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2014-04-21 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in mm/filemap.c
between commit b59b8cbca629 (mm: fix new kernel-doc warning in
filemap.c) from Linus' tree and commit cbabd10029a4 (write_iter
variants of {__,}generic_file_aio_write()) from the vfs tree.

I fixed it up (I used the vfs tree version) and can carry the fix as
necessary (no action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpaX9KSATukR.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-11-07 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/usb/core/file.c between commit 469271f8c48f ("drivers: usb: core:
{file,hub,sysfs,usb}.c: Whitespace fixes") from Linus' tree and commit
e84f9e57b90c ("consolidate the reassignments of ->f_op in ->open()
instances") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/usb/core/file.c
index 3bdfbf88a0ae,fe0d8365411a..
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@@ -27,29 -27,21 +27,21 @@@
  static const struct file_operations *usb_minors[MAX_USB_MINORS];
  static DECLARE_RWSEM(minor_rwsem);
  
 -static int usb_open(struct inode * inode, struct file * file)
 +static int usb_open(struct inode *inode, struct file *file)
  {
-   int minor = iminor(inode);
-   const struct file_operations *c;
int err = -ENODEV;
-   const struct file_operations *old_fops, *new_fops = NULL;
+   const struct file_operations *new_fops;
  
down_read(_rwsem);
-   c = usb_minors[minor];
+   new_fops = fops_get(usb_minors[iminor(inode)]);
  
-   if (!c || !(new_fops = fops_get(c)))
+   if (!new_fops)
goto done;
  
-   old_fops = file->f_op;
-   file->f_op = new_fops;
+   replace_fops(file, new_fops);
/* Curiouser and curiouser... NULL ->open() as "no device" ? */
if (file->f_op->open)
 -  err = file->f_op->open(inode,file);
 +  err = file->f_op->open(inode, file);
-   if (err) {
-   fops_put(file->f_op);
-   file->f_op = fops_get(old_fops);
-   }
-   fops_put(old_fops);
   done:
up_read(_rwsem);
return err;


pgpr6CO9a8rgP.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-11-07 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/usb/core/file.c between commit 469271f8c48f (drivers: usb: core:
{file,hub,sysfs,usb}.c: Whitespace fixes) from Linus' tree and commit
e84f9e57b90c (consolidate the reassignments of -f_op in -open()
instances) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/usb/core/file.c
index 3bdfbf88a0ae,fe0d8365411a..
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@@ -27,29 -27,21 +27,21 @@@
  static const struct file_operations *usb_minors[MAX_USB_MINORS];
  static DECLARE_RWSEM(minor_rwsem);
  
 -static int usb_open(struct inode * inode, struct file * file)
 +static int usb_open(struct inode *inode, struct file *file)
  {
-   int minor = iminor(inode);
-   const struct file_operations *c;
int err = -ENODEV;
-   const struct file_operations *old_fops, *new_fops = NULL;
+   const struct file_operations *new_fops;
  
down_read(minor_rwsem);
-   c = usb_minors[minor];
+   new_fops = fops_get(usb_minors[iminor(inode)]);
  
-   if (!c || !(new_fops = fops_get(c)))
+   if (!new_fops)
goto done;
  
-   old_fops = file-f_op;
-   file-f_op = new_fops;
+   replace_fops(file, new_fops);
/* Curiouser and curiouser... NULL -open() as no device ? */
if (file-f_op-open)
 -  err = file-f_op-open(inode,file);
 +  err = file-f_op-open(inode, file);
-   if (err) {
-   fops_put(file-f_op);
-   file-f_op = fops_get(old_fops);
-   }
-   fops_put(old_fops);
   done:
up_read(minor_rwsem);
return err;


pgpr6CO9a8rgP.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-09-04 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/dcache.c
between commit 98474236f72e ("vfs: make the dentry cache use the lockref
infrastructure") from Linus' tree and commit 590fb51f1cf9 ("vfs: call
d_op->d_prune() before unhashing dentry") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/dcache.c
index 96655f4,2e5f9ca..000
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@@ -726,7 -718,15 +726,15 @@@ restart
spin_lock(>i_lock);
hlist_for_each_entry(dentry, >i_dentry, d_alias) {
spin_lock(>d_lock);
 -  if (!dentry->d_count) {
 +  if (!dentry->d_lockref.count) {
+   /*
+* inform the fs via d_prune that this dentry
+* is about to be unhashed and destroyed.
+*/
+   if ((dentry->d_flags & DCACHE_OP_PRUNE) &&
+   !d_unhashed(dentry))
+   dentry->d_op->d_prune(dentry);
+ 
__dget_dlock(dentry);
__d_drop(dentry);
spin_unlock(>d_lock);


pgpQrnHmxaplm.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-09-04 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/dcache.c
between commit 98474236f72e (vfs: make the dentry cache use the lockref
infrastructure) from Linus' tree and commit 590fb51f1cf9 (vfs: call
d_op-d_prune() before unhashing dentry) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/dcache.c
index 96655f4,2e5f9ca..000
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@@ -726,7 -718,15 +726,15 @@@ restart
spin_lock(inode-i_lock);
hlist_for_each_entry(dentry, inode-i_dentry, d_alias) {
spin_lock(dentry-d_lock);
 -  if (!dentry-d_count) {
 +  if (!dentry-d_lockref.count) {
+   /*
+* inform the fs via d_prune that this dentry
+* is about to be unhashed and destroyed.
+*/
+   if ((dentry-d_flags  DCACHE_OP_PRUNE) 
+   !d_unhashed(dentry))
+   dentry-d_op-d_prune(dentry);
+ 
__dget_dlock(dentry);
__d_drop(dentry);
spin_unlock(dentry-d_lock);


pgpQrnHmxaplm.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/coredump.c
between commit acdedd99b0f3 ("coredump: sanitize the setting of
signal->group_exit_code") from Linus' tree and commit 03d95eb2f257 ("lift
sb_start_write() out of ->write()") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/coredump.c
index ec306cc,a987f3d..000
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@@ -419,22 -407,9 +419,20 @@@ static void coredump_finish(struct mm_s
mm->core_state = NULL;
  }
  
 +static bool dump_interrupted(void)
 +{
 +  /*
 +   * SIGKILL or freezing() interrupt the coredumping. Perhaps we
 +   * can do try_to_freeze() and check __fatal_signal_pending(),
 +   * but then we need to teach dump_write() to restart and clear
 +   * TIF_SIGPENDING.
 +   */
 +  return signal_pending(current);
 +}
 +
  static void wait_for_dump_helpers(struct file *file)
  {
-   struct pipe_inode_info *pipe;
- 
-   pipe = file_inode(file)->i_pipe;
+   struct pipe_inode_info *pipe = file->private_data;
  
pipe_lock(pipe);
pipe->readers++;
@@@ -656,7 -627,11 +654,9 @@@ void do_coredump(siginfo_t *siginfo
goto close_fail;
if (displaced)
put_files_struct(displaced);
+   file_start_write(cprm.file);
 -  retval = binfmt->core_dump();
 -  if (retval)
 -  current->signal->group_exit_code |= 0x80;
 +  core_dumped = !dump_interrupted() && binfmt->core_dump();
+   file_end_write(cprm.file);
  
if (ispipe && core_pipe_limit)
wait_for_dump_helpers(cprm.file);


pgpA03IkCvQqC.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/compat.c
between commit 76b021d053ed ("convert vmsplice to COMPAT_SYSCALL_DEFINE")
from Linus' tree and commit 72ec35163f9f ("switch compat readv/writev
variants to COMPAT_SYSCALL_DEFINE") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/compat.c
index 5f83ffa,5058345..000
--- a/fs/compat.c
+++ b/fs/compat.c
@@@ -1068,190 -1069,26 +1068,6 @@@ asmlinkage long compat_sys_getdents64(u
  }
  #endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */
  
- static ssize_t compat_do_readv_writev(int type, struct file *file,
-  const struct compat_iovec __user *uvector,
-  unsigned long nr_segs, loff_t *pos)
- {
-   compat_ssize_t tot_len;
-   struct iovec iovstack[UIO_FASTIOV];
-   struct iovec *iov = iovstack;
-   ssize_t ret;
-   io_fn_t fn;
-   iov_fn_t fnv;
- 
-   ret = -EINVAL;
-   if (!file->f_op)
-   goto out;
- 
-   ret = compat_rw_copy_check_uvector(type, uvector, nr_segs,
-  UIO_FASTIOV, iovstack, );
-   if (ret <= 0)
-   goto out;
- 
-   tot_len = ret;
-   ret = rw_verify_area(type, file, pos, tot_len);
-   if (ret < 0)
-   goto out;
- 
-   fnv = NULL;
-   if (type == READ) {
-   fn = file->f_op->read;
-   fnv = file->f_op->aio_read;
-   } else {
-   fn = (io_fn_t)file->f_op->write;
-   fnv = file->f_op->aio_write;
-   }
- 
-   if (fnv)
-   ret = do_sync_readv_writev(file, iov, nr_segs, tot_len,
-   pos, fnv);
-   else
-   ret = do_loop_readv_writev(file, iov, nr_segs, pos, fn);
- 
- out:
-   if (iov != iovstack)
-   kfree(iov);
-   if ((ret + (type == READ)) > 0) {
-   if (type == READ)
-   fsnotify_access(file);
-   else
-   fsnotify_modify(file);
-   }
-   return ret;
- }
- 
- static size_t compat_readv(struct file *file,
-  const struct compat_iovec __user *vec,
-  unsigned long vlen, loff_t *pos)
- {
-   ssize_t ret = -EBADF;
- 
-   if (!(file->f_mode & FMODE_READ))
-   goto out;
- 
-   ret = -EINVAL;
-   if (!file->f_op || (!file->f_op->aio_read && !file->f_op->read))
-   goto out;
- 
-   ret = compat_do_readv_writev(READ, file, vec, vlen, pos);
- 
- out:
-   if (ret > 0)
-   add_rchar(current, ret);
-   inc_syscr(current);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec,
-unsigned long vlen)
- {
-   struct fd f = fdget(fd);
-   ssize_t ret;
-   loff_t pos;
- 
-   if (!f.file)
-   return -EBADF;
-   pos = f.file->f_pos;
-   ret = compat_readv(f.file, vec, vlen, );
-   f.file->f_pos = pos;
-   fdput(f);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_preadv64(unsigned long fd, const struct compat_iovec __user *vec,
-   unsigned long vlen, loff_t pos)
- {
-   struct fd f;
-   ssize_t ret;
- 
-   if (pos < 0)
-   return -EINVAL;
-   f = fdget(fd);
-   if (!f.file)
-   return -EBADF;
-   ret = -ESPIPE;
-   if (f.file->f_mode & FMODE_PREAD)
-   ret = compat_readv(f.file, vec, vlen, );
-   fdput(f);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_preadv(unsigned long fd, const struct compat_iovec __user *vec,
- unsigned long vlen, u32 pos_low, u32 pos_high)
- {
-   loff_t pos = ((loff_t)pos_high << 32) | pos_low;
-   return compat_sys_preadv64(fd, vec, vlen, pos);
- }
- 
- static size_t compat_writev(struct file *file,
-   const struct compat_iovec __user *vec,
-   unsigned long vlen, loff_t *pos)
- {
-   ssize_t ret = -EBADF;
- 
-   if (!(file->f_mode & FMODE_WRITE))
-   goto out;
- 
-   ret = -EINVAL;
-   if (!file->f_op || (!file->f_op->aio_write && !file->f_op->write))
-   goto out;
- 
-   ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos);
- 
- out:
-   if (ret > 0)
-   add_wchar(current, ret);
-   inc_syscw(current);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec,
- unsigned long vlen)
- {
-   struct fd f = fdget(fd);
-   ssize_t ret;
-   loff_t pos;
- 
-   if (!f.file)
-   return -EBADF;
-   pos = f.file->f_pos;
-   ret = compat_writev(f.file, vec, vlen, );
-   

linux-next: manual merge of the vfs tree with Linus' tree

2013-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/compat.c
between commit 76b021d053ed (convert vmsplice to COMPAT_SYSCALL_DEFINE)
from Linus' tree and commit 72ec35163f9f (switch compat readv/writev
variants to COMPAT_SYSCALL_DEFINE) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/compat.c
index 5f83ffa,5058345..000
--- a/fs/compat.c
+++ b/fs/compat.c
@@@ -1068,190 -1069,26 +1068,6 @@@ asmlinkage long compat_sys_getdents64(u
  }
  #endif /* ! __ARCH_OMIT_COMPAT_SYS_GETDENTS64 */
  
- static ssize_t compat_do_readv_writev(int type, struct file *file,
-  const struct compat_iovec __user *uvector,
-  unsigned long nr_segs, loff_t *pos)
- {
-   compat_ssize_t tot_len;
-   struct iovec iovstack[UIO_FASTIOV];
-   struct iovec *iov = iovstack;
-   ssize_t ret;
-   io_fn_t fn;
-   iov_fn_t fnv;
- 
-   ret = -EINVAL;
-   if (!file-f_op)
-   goto out;
- 
-   ret = compat_rw_copy_check_uvector(type, uvector, nr_segs,
-  UIO_FASTIOV, iovstack, iov);
-   if (ret = 0)
-   goto out;
- 
-   tot_len = ret;
-   ret = rw_verify_area(type, file, pos, tot_len);
-   if (ret  0)
-   goto out;
- 
-   fnv = NULL;
-   if (type == READ) {
-   fn = file-f_op-read;
-   fnv = file-f_op-aio_read;
-   } else {
-   fn = (io_fn_t)file-f_op-write;
-   fnv = file-f_op-aio_write;
-   }
- 
-   if (fnv)
-   ret = do_sync_readv_writev(file, iov, nr_segs, tot_len,
-   pos, fnv);
-   else
-   ret = do_loop_readv_writev(file, iov, nr_segs, pos, fn);
- 
- out:
-   if (iov != iovstack)
-   kfree(iov);
-   if ((ret + (type == READ))  0) {
-   if (type == READ)
-   fsnotify_access(file);
-   else
-   fsnotify_modify(file);
-   }
-   return ret;
- }
- 
- static size_t compat_readv(struct file *file,
-  const struct compat_iovec __user *vec,
-  unsigned long vlen, loff_t *pos)
- {
-   ssize_t ret = -EBADF;
- 
-   if (!(file-f_mode  FMODE_READ))
-   goto out;
- 
-   ret = -EINVAL;
-   if (!file-f_op || (!file-f_op-aio_read  !file-f_op-read))
-   goto out;
- 
-   ret = compat_do_readv_writev(READ, file, vec, vlen, pos);
- 
- out:
-   if (ret  0)
-   add_rchar(current, ret);
-   inc_syscr(current);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec,
-unsigned long vlen)
- {
-   struct fd f = fdget(fd);
-   ssize_t ret;
-   loff_t pos;
- 
-   if (!f.file)
-   return -EBADF;
-   pos = f.file-f_pos;
-   ret = compat_readv(f.file, vec, vlen, pos);
-   f.file-f_pos = pos;
-   fdput(f);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_preadv64(unsigned long fd, const struct compat_iovec __user *vec,
-   unsigned long vlen, loff_t pos)
- {
-   struct fd f;
-   ssize_t ret;
- 
-   if (pos  0)
-   return -EINVAL;
-   f = fdget(fd);
-   if (!f.file)
-   return -EBADF;
-   ret = -ESPIPE;
-   if (f.file-f_mode  FMODE_PREAD)
-   ret = compat_readv(f.file, vec, vlen, pos);
-   fdput(f);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_preadv(unsigned long fd, const struct compat_iovec __user *vec,
- unsigned long vlen, u32 pos_low, u32 pos_high)
- {
-   loff_t pos = ((loff_t)pos_high  32) | pos_low;
-   return compat_sys_preadv64(fd, vec, vlen, pos);
- }
- 
- static size_t compat_writev(struct file *file,
-   const struct compat_iovec __user *vec,
-   unsigned long vlen, loff_t *pos)
- {
-   ssize_t ret = -EBADF;
- 
-   if (!(file-f_mode  FMODE_WRITE))
-   goto out;
- 
-   ret = -EINVAL;
-   if (!file-f_op || (!file-f_op-aio_write  !file-f_op-write))
-   goto out;
- 
-   ret = compat_do_readv_writev(WRITE, file, vec, vlen, pos);
- 
- out:
-   if (ret  0)
-   add_wchar(current, ret);
-   inc_syscw(current);
-   return ret;
- }
- 
- asmlinkage ssize_t
- compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec,
- unsigned long vlen)
- {
-   struct fd f = fdget(fd);
-   ssize_t ret;
-   loff_t pos;
- 
-   if (!f.file)
-   return -EBADF;
-   pos = f.file-f_pos;
-   ret = compat_writev(f.file, vec, vlen, pos);
-   f.file-f_pos = pos;
-   

linux-next: manual merge of the vfs tree with Linus' tree

2013-05-01 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/coredump.c
between commit acdedd99b0f3 (coredump: sanitize the setting of
signal-group_exit_code) from Linus' tree and commit 03d95eb2f257 (lift
sb_start_write() out of -write()) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/coredump.c
index ec306cc,a987f3d..000
--- a/fs/coredump.c
+++ b/fs/coredump.c
@@@ -419,22 -407,9 +419,20 @@@ static void coredump_finish(struct mm_s
mm-core_state = NULL;
  }
  
 +static bool dump_interrupted(void)
 +{
 +  /*
 +   * SIGKILL or freezing() interrupt the coredumping. Perhaps we
 +   * can do try_to_freeze() and check __fatal_signal_pending(),
 +   * but then we need to teach dump_write() to restart and clear
 +   * TIF_SIGPENDING.
 +   */
 +  return signal_pending(current);
 +}
 +
  static void wait_for_dump_helpers(struct file *file)
  {
-   struct pipe_inode_info *pipe;
- 
-   pipe = file_inode(file)-i_pipe;
+   struct pipe_inode_info *pipe = file-private_data;
  
pipe_lock(pipe);
pipe-readers++;
@@@ -656,7 -627,11 +654,9 @@@ void do_coredump(siginfo_t *siginfo
goto close_fail;
if (displaced)
put_files_struct(displaced);
+   file_start_write(cprm.file);
 -  retval = binfmt-core_dump(cprm);
 -  if (retval)
 -  current-signal-group_exit_code |= 0x80;
 +  core_dumped = !dump_interrupted()  binfmt-core_dump(cprm);
+   file_end_write(cprm.file);
  
if (ispipe  core_pipe_limit)
wait_for_dump_helpers(cprm.file);


pgpA03IkCvQqC.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-04-30 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/proc/internal.h between commit db3808c1bac6 ("mm, vmalloc: move
get_vmalloc_info() to vmalloc.c") from Linus' tree and commit
ae8970dd9ccb ("proc: Move non-public stuff from linux/proc_fs.h to
fs/proc/internal.h") from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/proc/internal.h
index 7571035,04255b6..000
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@@ -154,36 -191,56 +191,35 @@@ static inline struct proc_dir_entry *pd
atomic_inc(>count);
return pde;
  }
- void pde_put(struct proc_dir_entry *pde);
- 
- int proc_fill_super(struct super_block *);
- struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *);
- int proc_remount(struct super_block *sb, int *flags, char *data);
+ extern void pde_put(struct proc_dir_entry *);
  
  /*
-  * These are generic /proc routines that use the internal
-  * "struct proc_dir_entry" tree to traverse the filesystem.
-  *
-  * The /proc root directory has extended versions to take care
-  * of the /proc/ subdirectories.
+  * inode.c
   */
- int proc_readdir(struct file *, void *, filldir_t);
- struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
+ struct pde_opener {
+   struct file *file;
+   struct list_head lh;
+   int closing;
+   struct completion *c;
+ };
  
+ extern const struct inode_operations proc_pid_link_inode_operations;
  
+ extern void proc_init_inodecache(void);
+ extern struct inode *proc_get_inode(struct super_block *, struct 
proc_dir_entry *);
+ extern int proc_fill_super(struct super_block *);
+ extern void proc_entry_rundown(struct proc_dir_entry *);
  
- /* Lookups */
- typedef struct dentry *instantiate_t(struct inode *, struct dentry *,
-   struct task_struct *, const void *);
- int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
-   const char *name, int len,
-   instantiate_t instantiate, struct task_struct *task, const void *ptr);
- int pid_revalidate(struct dentry *dentry, unsigned int flags);
- struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct 
*task);
- extern const struct dentry_operations pid_dentry_operations;
- int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
*stat);
- int proc_setattr(struct dentry *dentry, struct iattr *attr);
+ /*
 - * mmu.c
 - */
 -struct vmalloc_info {
 -  unsigned long   used;
 -  unsigned long   largest_chunk;
 -};
 -
 -#ifdef CONFIG_MMU
 -#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
 -extern void get_vmalloc_info(struct vmalloc_info *);
 -
 -#else
 -#define VMALLOC_TOTAL 0UL
 -static inline void get_vmalloc_info(struct vmalloc_info *vmi)
 -{
 -  vmi->used = 0;
 -  vmi->largest_chunk = 0;
 -}
 -#endif
 -
 -/*
+  * proc_devtree.c
+  */
+ #ifdef CONFIG_PROC_DEVICETREE
+ extern void proc_device_tree_init(void);
+ #endif
  
+ /*
+  * proc_namespaces.c
+  */
  extern const struct inode_operations proc_ns_dir_inode_operations;
  extern const struct file_operations proc_ns_dir_operations;
  


pgpVxuDSbpil1.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-04-30 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
fs/proc/internal.h between commit db3808c1bac6 (mm, vmalloc: move
get_vmalloc_info() to vmalloc.c) from Linus' tree and commit
ae8970dd9ccb (proc: Move non-public stuff from linux/proc_fs.h to
fs/proc/internal.h) from the vfs tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc fs/proc/internal.h
index 7571035,04255b6..000
--- a/fs/proc/internal.h
+++ b/fs/proc/internal.h
@@@ -154,36 -191,56 +191,35 @@@ static inline struct proc_dir_entry *pd
atomic_inc(pde-count);
return pde;
  }
- void pde_put(struct proc_dir_entry *pde);
- 
- int proc_fill_super(struct super_block *);
- struct inode *proc_get_inode(struct super_block *, struct proc_dir_entry *);
- int proc_remount(struct super_block *sb, int *flags, char *data);
+ extern void pde_put(struct proc_dir_entry *);
  
  /*
-  * These are generic /proc routines that use the internal
-  * struct proc_dir_entry tree to traverse the filesystem.
-  *
-  * The /proc root directory has extended versions to take care
-  * of the /proc/pid subdirectories.
+  * inode.c
   */
- int proc_readdir(struct file *, void *, filldir_t);
- struct dentry *proc_lookup(struct inode *, struct dentry *, unsigned int);
+ struct pde_opener {
+   struct file *file;
+   struct list_head lh;
+   int closing;
+   struct completion *c;
+ };
  
+ extern const struct inode_operations proc_pid_link_inode_operations;
  
+ extern void proc_init_inodecache(void);
+ extern struct inode *proc_get_inode(struct super_block *, struct 
proc_dir_entry *);
+ extern int proc_fill_super(struct super_block *);
+ extern void proc_entry_rundown(struct proc_dir_entry *);
  
- /* Lookups */
- typedef struct dentry *instantiate_t(struct inode *, struct dentry *,
-   struct task_struct *, const void *);
- int proc_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
-   const char *name, int len,
-   instantiate_t instantiate, struct task_struct *task, const void *ptr);
- int pid_revalidate(struct dentry *dentry, unsigned int flags);
- struct inode *proc_pid_make_inode(struct super_block * sb, struct task_struct 
*task);
- extern const struct dentry_operations pid_dentry_operations;
- int pid_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat 
*stat);
- int proc_setattr(struct dentry *dentry, struct iattr *attr);
+ /*
 - * mmu.c
 - */
 -struct vmalloc_info {
 -  unsigned long   used;
 -  unsigned long   largest_chunk;
 -};
 -
 -#ifdef CONFIG_MMU
 -#define VMALLOC_TOTAL (VMALLOC_END - VMALLOC_START)
 -extern void get_vmalloc_info(struct vmalloc_info *);
 -
 -#else
 -#define VMALLOC_TOTAL 0UL
 -static inline void get_vmalloc_info(struct vmalloc_info *vmi)
 -{
 -  vmi-used = 0;
 -  vmi-largest_chunk = 0;
 -}
 -#endif
 -
 -/*
+  * proc_devtree.c
+  */
+ #ifdef CONFIG_PROC_DEVICETREE
+ extern void proc_device_tree_init(void);
+ #endif
  
+ /*
+  * proc_namespaces.c
+  */
  extern const struct inode_operations proc_ns_dir_inode_operations;
  extern const struct file_operations proc_ns_dir_operations;
  


pgpVxuDSbpil1.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-04-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/firmware/efivars.c between commit 0635eb8a54cf ("Move utf16
functions to kernel core and rename") from Linus' tree and commit
a2162ae42bc4 ("Include missing linux/magic.h inclusions") from the vfs
tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/firmware/efivars.c
index f4baa11,0f102601..000
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@@ -80,7 -80,7 +80,8 @@@
  #include 
  #include 
  #include 
 +#include 
+ #include 
  
  #include 
  #include 


pgpiudpa7yX3Y.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2013-04-28 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/firmware/efivars.c between commit 0635eb8a54cf (Move utf16
functions to kernel core and rename) from Linus' tree and commit
a2162ae42bc4 (Include missing linux/magic.h inclusions) from the vfs
tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/firmware/efivars.c
index f4baa11,0f102601..000
--- a/drivers/firmware/efivars.c
+++ b/drivers/firmware/efivars.c
@@@ -80,7 -80,7 +80,8 @@@
  #include linux/slab.h
  #include linux/pstore.h
  #include linux/ctype.h
 +#include linux/ucs2_string.h
+ #include linux/magic.h
  
  #include linux/fs.h
  #include linux/ramfs.h


pgpiudpa7yX3Y.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-09-23 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/stat.c
between commit 55815f70147d ("vfs: make O_PATH file descriptors usable
for 'fstat()'") from Linus' tree and commit 19ba95358327 ("switch simple
cases of fget_light to fdget") from the vfs tree.

I just used the vfs tree version and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpowxCFvUvtH.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-09-23 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in fs/stat.c
between commit 55815f70147d (vfs: make O_PATH file descriptors usable
for 'fstat()') from Linus' tree and commit 19ba95358327 (switch simple
cases of fget_light to fdget) from the vfs tree.

I just used the vfs tree version and can carry the fix as necessary (no
action is required).

-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au


pgpowxCFvUvtH.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-07-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/usb/gadget/storage_common.c between commit d6e16a89578f ("usb:
gadget: mass_storage: fail fsg_store_file() early if colud not open
file") from Linus' tree and commit 20818a0caa84 ("gadgetfs: clean up")
from the vfs tree.

Context changes.  I fixed it up (I think - see below) and can carry the
fix as necessary.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/usb/gadget/storage_common.c
index ae8b188,f929432..000
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@@ -709,12 -706,6 +708,11 @@@ static int fsg_lun_open(struct fsg_lun 
goto out;
}
  
 +  if (fsg_lun_is_open(curlun))
 +  fsg_lun_close(curlun);
 +
-   get_file(filp);
 +  curlun->blksize = blksize;
 +  curlun->blkbits = blkbits;
curlun->ro = ro;
curlun->filp = filp;
curlun->file_length = size;


pgpxx5or0KqdN.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-07-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/staging/gdm72xx/usb_boot.c between commit d67030d215ac
("staging/gdm72xx: return PTR_ERR rather -ENOENT") from Linus' tree and
commit 09fada5b5f1f ("slightly reduce lossage in gdm72xx") from the vfs
tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/staging/gdm72xx/usb_boot.c
index fef290c,b366a54..000
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@@ -173,8 -174,7 +173,7 @@@ int usb_boot(struct usb_device *usbdev
filp = filp_open(img_name, O_RDONLY | O_LARGEFILE, 0);
if (IS_ERR(filp)) {
printk(KERN_ERR "Can't find %s.\n", img_name);
-   set_fs(fs);
 -  ret = -ENOENT;
 +  ret = PTR_ERR(filp);
goto restore_fs;
}
  


pgpudbW3oGNO2.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-07-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/staging/gdm72xx/usb_boot.c between commit d67030d215ac
(staging/gdm72xx: return PTR_ERR rather -ENOENT) from Linus' tree and
commit 09fada5b5f1f (slightly reduce lossage in gdm72xx) from the vfs
tree.

Just context changes.  I fixed it up (see below) and can carry the fix as
necessary.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/staging/gdm72xx/usb_boot.c
index fef290c,b366a54..000
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@@ -173,8 -174,7 +173,7 @@@ int usb_boot(struct usb_device *usbdev
filp = filp_open(img_name, O_RDONLY | O_LARGEFILE, 0);
if (IS_ERR(filp)) {
printk(KERN_ERR Can't find %s.\n, img_name);
-   set_fs(fs);
 -  ret = -ENOENT;
 +  ret = PTR_ERR(filp);
goto restore_fs;
}
  


pgpudbW3oGNO2.pgp
Description: PGP signature


linux-next: manual merge of the vfs tree with Linus' tree

2012-07-29 Thread Stephen Rothwell
Hi Al,

Today's linux-next merge of the vfs tree got a conflict in
drivers/usb/gadget/storage_common.c between commit d6e16a89578f (usb:
gadget: mass_storage: fail fsg_store_file() early if colud not open
file) from Linus' tree and commit 20818a0caa84 (gadgetfs: clean up)
from the vfs tree.

Context changes.  I fixed it up (I think - see below) and can carry the
fix as necessary.
-- 
Cheers,
Stephen Rothwells...@canb.auug.org.au

diff --cc drivers/usb/gadget/storage_common.c
index ae8b188,f929432..000
--- a/drivers/usb/gadget/storage_common.c
+++ b/drivers/usb/gadget/storage_common.c
@@@ -709,12 -706,6 +708,11 @@@ static int fsg_lun_open(struct fsg_lun 
goto out;
}
  
 +  if (fsg_lun_is_open(curlun))
 +  fsg_lun_close(curlun);
 +
-   get_file(filp);
 +  curlun-blksize = blksize;
 +  curlun-blkbits = blkbits;
curlun-ro = ro;
curlun-filp = filp;
curlun-file_length = size;


pgpxx5or0KqdN.pgp
Description: PGP signature