From: Dave Chinner Date: Thu, 4 Jun 2015 03:01:49 +0000 (+1000) Subject: Merge branch 'xfs-dax-support' into for-next X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=66e8ac7bfa0a591b8cfaa447db2daa5b6e9221d0;p=deliverable%2Flinux.git Merge branch 'xfs-dax-support' into for-next --- 66e8ac7bfa0a591b8cfaa447db2daa5b6e9221d0 diff --cc fs/xfs/xfs_file.c index 3b7591224f4a,cfd9b4f5ad6e..84b2421b22ae --- a/fs/xfs/xfs_file.c +++ b/fs/xfs/xfs_file.c @@@ -108,23 -110,30 +110,30 @@@ xfs_iozero if (bytes > count) bytes = count; - status = pagecache_write_begin(NULL, mapping, pos, bytes, - AOP_FLAG_UNINTERRUPTIBLE, - &page, &fsdata); - if (status) - break; + if (IS_DAX(VFS_I(ip))) { + status = dax_zero_page_range(VFS_I(ip), pos, bytes, + xfs_get_blocks_direct); + if (status) + break; + } else { + status = pagecache_write_begin(NULL, mapping, pos, bytes, + AOP_FLAG_UNINTERRUPTIBLE, + &page, &fsdata); + if (status) + break; - zero_user(page, offset, bytes); + zero_user(page, offset, bytes); - status = pagecache_write_end(NULL, mapping, pos, bytes, bytes, - page, fsdata); - WARN_ON(status <= 0); /* can't return less than zero! */ + status = pagecache_write_end(NULL, mapping, pos, bytes, + bytes, page, fsdata); + WARN_ON(status <= 0); /* can't return less than zero! */ + status = 0; + } pos += bytes; count -= bytes; - status = 0; } while (count); - return (-status); + return status; } int