1. 05 9月, 2017 2 次提交
  2. 04 9月, 2017 1 次提交
  3. 28 7月, 2017 4 次提交
    • M
      ovl: constant d_ino for non-merge dirs · 4edb83bb
      Miklos Szeredi 提交于
      Impure directories are ones which contain objects with origins (i.e. those
      that have been copied up).  These are relevant to readdir operation only
      because of the d_ino field, no other transformation is necessary.  Also a
      directory can become impure between two getdents(2) calls.
      
      This patch creates a cache for impure directories.  Unlike the cache for
      merged directories, this one only contains entries with origin and is not
      refcounted but has a its lifetime tied to that of the dentry.
      
      Similarly to the merged cache, the impure cache is invalidated based on a
      version number.  This version number is incremented when an entry with
      origin is added or removed from the directory.
      
      If the cache is empty, then the impure xattr is removed from the directory.
      
      This patch also fixes up handling of d_ino for the ".." entry if the parent
      directory is merged.
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      4edb83bb
    • A
      ovl: constant d_ino across copy up · b5efccbe
      Amir Goldstein 提交于
      When all layers are on the same fs, and iterating a directory which may
      contain copy up entries, call vfs_getattr() on the overlay entries to make
      sure that d_ino will be consistent with st_ino from stat(2).
      
      There is an overhead of lookup per upper entry in readdir.
      
      The overhead is minimal if the iterated entries are already in dcache.  It
      is also quite useful for the common case of 'ls -l' that readdir() pre
      populates the dcache with the listed entries, making the following stat()
      calls faster.
      Signed-off-by: NAmir Goldstein <amir73il@gmail.com>
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      b5efccbe
    • M
      ovl: fix readdir error value · 31e8ccea
      Miklos Szeredi 提交于
      actor's return value is taken as a bool (filled/not filled) so we need to
      return the error in the context.
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      31e8ccea
    • M
      ovl: check snprintf return · 6787341a
      Miklos Szeredi 提交于
      Signed-off-by: NMiklos Szeredi <mszeredi@redhat.com>
      6787341a
  4. 22 7月, 2017 1 次提交
  5. 21 7月, 2017 5 次提交
  6. 20 7月, 2017 8 次提交
  7. 19 7月, 2017 1 次提交
    • J
      hfsplus: Don't clear SGID when inheriting ACLs · 84969465
      Jan Kara 提交于
      When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
      set, DIR1 is expected to have SGID bit set (and owning group equal to
      the owning group of 'DIR0'). However when 'DIR0' also has some default
      ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
      'DIR1' to get cleared if user is not member of the owning group.
      
      Fix the problem by creating __hfsplus_set_posix_acl() function that does
      not call posix_acl_update_mode() and use it when inheriting ACLs. That
      prevents SGID bit clearing and the mode has been properly set by
      posix_acl_create() anyway.
      
      Fixes: 07393101
      CC: stable@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      84969465
  8. 18 7月, 2017 6 次提交
  9. 17 7月, 2017 4 次提交
    • Y
      ceph: fix race in concurrent readdir · 84583cfb
      Yan, Zheng 提交于
      For a large directory, program needs to issue multiple readdir
      syscalls to get all dentries. When there are multiple programs
      read the directory concurrently. Following sequence of events
      can happen.
      
       - program calls readdir with pos = 2. ceph sends readdir request
         to mds. The reply contains N1 entries. ceph adds these N1 entries
         to readdir cache.
       - program calls readdir with pos = N1+2. The readdir is satisfied
         by the readdir cache, N2 entries are returned. (Other program
         calls readdir in the middle, which fills the cache)
       - program calls readdir with pos = N1+N2+2. ceph sends readdir
         request to mds. The reply contains N3 entries and it reaches
         directory end. ceph adds these N3 entries to the readdir cache
         and marks directory complete.
      
      The second readdir call does not update fi->readdir_cache_idx.
      ceph add the last N3 entries to wrong places.
      
      Cc: stable@vger.kernel.org # v4.3+
      Signed-off-by: N"Yan, Zheng" <zyan@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      84583cfb
    • J
      ext2: Don't clear SGID when inheriting ACLs · a992f2d3
      Jan Kara 提交于
      When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
      set, DIR1 is expected to have SGID bit set (and owning group equal to
      the owning group of 'DIR0'). However when 'DIR0' also has some default
      ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
      'DIR1' to get cleared if user is not member of the owning group.
      
      Fix the problem by creating __ext2_set_acl() function that does not call
      posix_acl_update_mode() and use it when inheriting ACLs. That prevents
      SGID bit clearing and the mode has been properly set by
      posix_acl_create() anyway.
      
      Fixes: 07393101
      CC: stable@vger.kernel.org
      CC: linux-ext4@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      a992f2d3
    • J
      reiserfs: Don't clear SGID when inheriting ACLs · 6883cd7f
      Jan Kara 提交于
      When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
      set, DIR1 is expected to have SGID bit set (and owning group equal to
      the owning group of 'DIR0'). However when 'DIR0' also has some default
      ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
      'DIR1' to get cleared if user is not member of the owning group.
      
      Fix the problem by moving posix_acl_update_mode() out of
      __reiserfs_set_acl() into reiserfs_set_acl(). That way the function will
      not be called when inheriting ACLs which is what we want as it prevents
      SGID bit clearing and the mode has been properly set by
      posix_acl_create() anyway.
      
      Fixes: 07393101
      CC: stable@vger.kernel.org
      CC: reiserfs-devel@vger.kernel.org
      Signed-off-by: NJan Kara <jack@suse.cz>
      6883cd7f
    • G
      binfmt_flat: Use %u to format u32 · a8605423
      Geert Uytterhoeven 提交于
      Several variables had their types changed from unsigned long to u32, but
      the printk()-style format to print them wasn't updated, leading to:
      
          fs/binfmt_flat.c: In function ‘load_flat_file’:
          fs/binfmt_flat.c:577: warning: format ‘%ld’ expects type ‘long int’, but argument 3 has type ‘u32’
      
      Fixes: 468138d7 ("binfmt_flat: flat_{get,put}_addr_from_rp() should be able to fail")
      Signed-off-by: NGeert Uytterhoeven <geert@linux-m68k.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a8605423
  10. 16 7月, 2017 2 次提交
  11. 15 7月, 2017 6 次提交