OSDN Git Service

Merge tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Jul 2018 19:38:16 +0000 (12:38 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 1 Jul 2018 19:38:16 +0000 (12:38 -0700)
Pull btrfs fixes from David Sterba:
 "We have a few regression fixes for qgroup rescan status tracking and
  the vm_fault_t conversion that mixed up the error values"

* tag 'for-4.18-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Btrfs: fix mount failure when qgroup rescan is in progress
  Btrfs: fix regression in btrfs_page_mkwrite() from vm_fault_t conversion
  btrfs: quota: Set rescan progress to (u64)-1 if we hit last leaf

1  2 
fs/btrfs/inode.c

diff --combined fs/btrfs/inode.c
@@@ -5745,7 -5745,7 +5745,7 @@@ static struct inode *new_simple_dir(str
        inode->i_mtime = current_time(inode);
        inode->i_atime = inode->i_mtime;
        inode->i_ctime = inode->i_mtime;
 -      BTRFS_I(inode)->i_otime = inode->i_mtime;
 +      BTRFS_I(inode)->i_otime = timespec64_to_timespec(inode->i_mtime);
  
        return inode;
  }
@@@ -6094,7 -6094,7 +6094,7 @@@ static int btrfs_dirty_inode(struct ino
   * This is a copy of file_update_time.  We need this so we can return error on
   * ENOSPC for updating the inode in the case of file write and mmap writes.
   */
 -static int btrfs_update_time(struct inode *inode, struct timespec *now,
 +static int btrfs_update_time(struct inode *inode, struct timespec64 *now,
                             int flags)
  {
        struct btrfs_root *root = BTRFS_I(inode)->root;
@@@ -6349,7 -6349,7 +6349,7 @@@ static struct inode *btrfs_new_inode(st
        inode->i_mtime = current_time(inode);
        inode->i_atime = inode->i_mtime;
        inode->i_ctime = inode->i_mtime;
 -      BTRFS_I(inode)->i_otime = inode->i_mtime;
 +      BTRFS_I(inode)->i_otime = timespec64_to_timespec(inode->i_mtime);
  
        inode_item = btrfs_item_ptr(path->nodes[0], path->slots[0],
                                  struct btrfs_inode_item);
@@@ -9005,13 -9005,14 +9005,14 @@@ again
  
        unlock_extent_cached(io_tree, page_start, page_end, &cached_state);
  
- out_unlock:
        if (!ret2) {
                btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, true);
                sb_end_pagefault(inode->i_sb);
                extent_changeset_free(data_reserved);
                return VM_FAULT_LOCKED;
        }
+ out_unlock:
        unlock_page(page);
  out:
        btrfs_delalloc_release_extents(BTRFS_I(inode), PAGE_SIZE, (ret != 0));
@@@ -9435,7 -9436,7 +9436,7 @@@ static int btrfs_rename_exchange(struc
        struct btrfs_root *dest = BTRFS_I(new_dir)->root;
        struct inode *new_inode = new_dentry->d_inode;
        struct inode *old_inode = old_dentry->d_inode;
 -      struct timespec ctime = current_time(old_inode);
 +      struct timespec64 ctime = current_time(old_inode);
        struct dentry *parent;
        u64 old_ino = btrfs_ino(BTRFS_I(old_inode));
        u64 new_ino = btrfs_ino(BTRFS_I(new_inode));