diff options
author | Arnd Bergmann <arnd@arndb.de> | 2012-01-03 21:22:31 +0000 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-03 21:22:46 +0000 |
commit | 1fc3eb81100c3f3cd44e706e54390151b0f1ce74 (patch) | |
tree | 922f64310caa55a3b417958a1c256a96f47c4b66 /fs/btrfs/file.c | |
parent | e006d6563bca989aeae1bc5ebc03dacdf5e15b32 (diff) | |
parent | ee9ba0f2fd5819e377cdec974a2022a7af02a385 (diff) | |
download | talos-op-linux-1fc3eb81100c3f3cd44e706e54390151b0f1ce74.tar.gz talos-op-linux-1fc3eb81100c3f3cd44e706e54390151b0f1ce74.zip |
Merge branch 'imx/board' into next/boards
* imx/board: (4 commits)
Enable 32 bit flash support for iMX21ADS board
ARM: mx31pdk: Add MC13783 RTC support
iomux-mx25: configuration to support CSPI3 on CSI pins
MX1:apf9328: Add i2c support
Updated to v3.2-rc6, conflicts:
arch/arm/kernel/setup.c
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r-- | fs/btrfs/file.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index dafdfa059bf6..97fbe939c050 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1167,6 +1167,8 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file, nrptrs = min((iov_iter_count(i) + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE, PAGE_CACHE_SIZE / (sizeof(struct page *))); + nrptrs = min(nrptrs, current->nr_dirtied_pause - current->nr_dirtied); + nrptrs = max(nrptrs, 8); pages = kmalloc(nrptrs * sizeof(struct page *), GFP_KERNEL); if (!pages) return -ENOMEM; @@ -1387,7 +1389,11 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb, goto out; } - file_update_time(file); + err = btrfs_update_time(file); + if (err) { + mutex_unlock(&inode->i_mutex); + goto out; + } BTRFS_I(inode)->sequence++; start_pos = round_down(pos, root->sectorsize); |