fs: Add helper to clean bdev aliases under a bh and use it
[sfrench/cifs-2.6.git] / fs / ntfs / file.c
index f548629dfaacb426d4d31da3908c1af8a0f4e10d..99510d811a8c87bbaba51419a63816a7036ece89 100644 (file)
@@ -740,8 +740,7 @@ map_buffer_cached:
                                        set_buffer_uptodate(bh);
                                if (unlikely(was_hole)) {
                                        /* We allocated the buffer. */
-                                       unmap_underlying_metadata(bh->b_bdev,
-                                                       bh->b_blocknr);
+                                       clean_bdev_bh_alias(bh);
                                        if (bh_end <= pos || bh_pos >= end)
                                                mark_buffer_dirty(bh);
                                        else
@@ -784,7 +783,7 @@ map_buffer_cached:
                                continue;
                        }
                        /* We allocated the buffer. */
-                       unmap_underlying_metadata(bh->b_bdev, bh->b_blocknr);
+                       clean_bdev_bh_alias(bh);
                        /*
                         * If the buffer is fully outside the write, zero it,
                         * set it uptodate, and mark it dirty so it gets
@@ -1850,7 +1849,7 @@ again:
                 * pages being swapped out between us bringing them into memory
                 * and doing the actual copying.
                 */
-               if (unlikely(iov_iter_fault_in_multipages_readable(i, bytes))) {
+               if (unlikely(iov_iter_fault_in_readable(i, bytes))) {
                        status = -EFAULT;
                        break;
                }