From d132e93b64d6fbae9d469696fa4d74ed6156d853 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sun, 18 Dec 2011 20:00:13 +0000 Subject: [PATCH] --- yaml --- r: 286042 b: refs/heads/master c: 5bf1f26227a59b9634e95eb3c7c012b766e5e6a0 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_file.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 6a67c7c7787d..4deaa2895333 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2813d682e8e6a278f94817429afd46b30875bb6e +refs/heads/master: 5bf1f26227a59b9634e95eb3c7c012b766e5e6a0 diff --git a/trunk/fs/xfs/xfs_file.c b/trunk/fs/xfs/xfs_file.c index 632313926788..134ff2fe4f4d 100644 --- a/trunk/fs/xfs/xfs_file.c +++ b/trunk/fs/xfs/xfs_file.c @@ -636,7 +636,9 @@ xfs_zero_eof( /* * Common pre-write limit and setup checks. * - * Returns with iolock held according to @iolock. + * Called with the iolocked held either shared and exclusive according to + * @iolock, and returns with it held. Might upgrade the iolock to exclusive + * if called for a direct write beyond i_size. */ STATIC ssize_t xfs_file_aio_write_checks( @@ -653,8 +655,7 @@ xfs_file_aio_write_checks( restart: error = generic_write_checks(file, pos, count, S_ISBLK(inode->i_mode)); if (error) { - xfs_rw_iunlock(ip, XFS_ILOCK_EXCL | *iolock); - *iolock = 0; + xfs_rw_iunlock(ip, XFS_ILOCK_EXCL); return error; }