1. 06 2月, 2018 1 次提交
  2. 30 1月, 2018 2 次提交
  3. 23 1月, 2018 7 次提交
  4. 22 1月, 2018 27 次提交
  5. 03 1月, 2018 1 次提交
    • N
      btrfs: Fix flush bio leak · beed9263
      Nikolay Borisov 提交于
      Commit e0ae9994 ("btrfs: preallocate device flush bio") reworked
      the way the flush bio is allocated and used. Concretely it allocates
      the bio in __alloc_device and then re-uses it multiple times with a
      very simple endio routine that just calls complete() without consuming
      a reference. Allocated bios by default come with a ref count of 1,
      which is then consumed by the endio routine (or not, in which case they
      should be bio_put by the caller). The way the impleementation works now
      is that the flush bio has a refcount of 2 and we only ever bio_put it
      once, leaving it to hang indefinitely. Fix this by removing the extra
      bio_get in __alloc_device.
      
      Fixes: e0ae9994 ("btrfs: preallocate device flush bio")
      Signed-off-by: NNikolay Borisov <nborisov@suse.com>
      Reviewed-by: NLiu Bo <bo.li.liu@oracle.com>
      Reviewed-by: NDavid Sterba <dsterba@suse.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      beed9263
  6. 28 11月, 2017 1 次提交
    • L
      Rename superblock flags (MS_xyz -> SB_xyz) · 1751e8a6
      Linus Torvalds 提交于
      This is a pure automated search-and-replace of the internal kernel
      superblock flags.
      
      The s_flags are now called SB_*, with the names and the values for the
      moment mirroring the MS_* flags that they're equivalent to.
      
      Note how the MS_xyz flags are the ones passed to the mount system call,
      while the SB_xyz flags are what we then use in sb->s_flags.
      
      The script to do this was:
      
          # places to look in; re security/*: it generally should *not* be
          # touched (that stuff parses mount(2) arguments directly), but
          # there are two places where we really deal with superblock flags.
          FILES="drivers/mtd drivers/staging/lustre fs ipc mm \
                  include/linux/fs.h include/uapi/linux/bfs_fs.h \
                  security/apparmor/apparmorfs.c security/apparmor/include/lib.h"
          # the list of MS_... constants
          SYMS="RDONLY NOSUID NODEV NOEXEC SYNCHRONOUS REMOUNT MANDLOCK \
                DIRSYNC NOATIME NODIRATIME BIND MOVE REC VERBOSE SILENT \
                POSIXACL UNBINDABLE PRIVATE SLAVE SHARED RELATIME KERNMOUNT \
                I_VERSION STRICTATIME LAZYTIME SUBMOUNT NOREMOTELOCK NOSEC BORN \
                ACTIVE NOUSER"
      
          SED_PROG=
          for i in $SYMS; do SED_PROG="$SED_PROG -e s/MS_$i/SB_$i/g"; done
      
          # we want files that contain at least one of MS_...,
          # with fs/namespace.c and fs/pnode.c excluded.
          L=$(for i in $SYMS; do git grep -w -l MS_$i $FILES; done| sort|uniq|grep -v '^fs/namespace.c'|grep -v '^fs/pnode.c')
      
          for f in $L; do sed -i $f $SED_PROG; done
      Requested-by: NAl Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1751e8a6
  7. 15 11月, 2017 1 次提交
    • D
      btrfs: dev_alloc_list is not protected by RCU, use normal list_del · 619c47f3
      David Sterba 提交于
      The dev_alloc_list list could be protected by various mutexes,
      depending on the context. The list tracks devices that can take part of
      allocating new chunks, so the closest mutex is chunk_mutex. Adding a new
      device from inside the ADD_DEV ioctl will need device_list_mutex and
      registering a new device from the ioctl needs uuid_mutex.
      
      All mutexes naturally guarantee exclusivity against the same context.
      The device ownership can move between the contexts and the exclusivity
      is guaranteed by other means, eg. during the mount with the uuid_mutex.
      
      There's no RCU involved for dev_alloc_list.
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      619c47f3