1. 23 6月, 2008 3 次提交
    • M
      [patch for 2.6.26 1/4] vfs: utimensat(): ignore tv_sec if tv_nsec == UTIME_OMIT or UTIME_NOW · 94c70b9b
      Michael Kerrisk 提交于
      The POSIX.1 draft spec for utimensat() says that if a times[n].tv_nsec
      field is UTIME_OMIT or UTIME_NOW, then the value in the corresponding
      tv_sec field is ignored.  See the last sentence of this para, from
      the spec:
      
          If the tv_nsec field of a timespec structure has
          the special value UTIME_NOW, the file's relevant
          timestamp shall be set to the greatest value
          supported by the file system that is not greater than
          the current time. If the tv_nsec field has the
          special value UTIME_OMIT, the file's relevant
          timestamp shall not be changed. In either case,
          the tv_sec field shall be ignored.
      
      However the current Linux implementation requires the tv_sec value to be
      zero (or the EINVAL error results). This requirement should be removed.
      Acked-by: NMiklos Szeredi <miklos@szeredi.hu>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Signed-off-by: NMichael Kerrisk <mtk.manpages@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      94c70b9b
    • M
      [patch for 2.6.26 2/4] vfs: utimensat(): be consistent with utime() for... · 12fd0d30
      Michael Kerrisk 提交于
      [patch for 2.6.26 2/4] vfs: utimensat(): be consistent with utime() for immutable and append-only files
      
      This patch fixes utimensat() to make its behavior consistent
      with that of utime()/utimes() when dealing with files marked
      immutable and append-only.
      
      The current utimensat() implementation also returns EPERM if
      'times' is non-NULL and the tv_nsec fields are both UTIME_NOW.
      For consistency, the
      
      (times != NULL && times[0].tv_nsec == UTIME_NOW &&
                        times[1].tv_nsec == UTIME_NOW)
      
      case should be treated like the traditional utimes() case where
      'times' is NULL.  That is, the call should succeed for a file
      marked append-only and should give the error EACCES if the file
      is marked as immutable.
      
      The simple way to do this is to set 'times' to NULL
      if (times[0].tv_nsec == UTIME_NOW && times[1].tv_nsec == UTIME_NOW).
      
      This is also the natural approach, since POSIX.1 semantics consider the
      times == {{x, UTIME_NOW}, {y, UTIME_NOW}}
      to be exactly equivalent to the case for
      times == NULL.
      
      (Thanks to Miklos for pointing this out.)
      
      Patch 3 in this series relies on the simplification provided
      by this patch.
      Acked-by: NMiklos Szeredi <miklos@szeredi.hu>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Cc: Ulrich Drepper <drepper@redhat.com>
      Signed-off-by: NMichael Kerrisk <mtk.manpages@gmail.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      12fd0d30
    • A
      [PATCH] fix cgroup-inflicted breakage in block_dev.c · fe6e9c1f
      Al Viro 提交于
      devcgroup_inode_permission() expects MAY_FOO, not FMODE_FOO; kindly
      keep your misdesign consistent if you positively have to inflict it
      on the kernel.
      Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
      fe6e9c1f
  2. 22 6月, 2008 4 次提交
  3. 21 6月, 2008 29 次提交
  4. 20 6月, 2008 4 次提交