search for: iov_iter_copy_from_us

Displaying 2 results from an estimated 2 matches for "iov_iter_copy_from_us".

2010 Dec 07
9
[PATCH] Btrfs: pwrite blocked when writing from the mmaped buffer of the same page
...PAGE_CACHE_SIZE - offset, write_bytes); struct page *page = prepared_pages[pg]; again: - /* - * Copy data from userspace to the current page - * - * Disable pagefault to avoid recursive lock since the pages - * are already locked - */ - pagefault_disable(); - copied = iov_iter_copy_from_user_atomic(page, i, offset, count); - pagefault_enable(); + if (unlikely(iov_iter_fault_in_readable(i, count))) + return -EFAULT; + + /* Copy data from userspace to the current page */ + copied = iov_iter_copy_from_user(page, i, offset, count); /* Flush processor''s dcache for this...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read, just in case it was actually a short read and we need to just return. This is similar to what already happens in the write case. If we have a short read while doing O_DIRECT, instead of just returning, fallthrough and try to read the rest via buffered IO. BTRFS needs this because if we encounter a compressed or