aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2007-10-16 04:25:07 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-16 12:42:55 -0400
commit89e107877b65bf6eff1d63a1302dee9a091586f5 (patch)
tree8a120a04c46f19229d1cf9b9c546f1818cf84c44 /mm
parent7765ec26ae1c01bb29bedf910e4efcced8cc81d2 (diff)
fs: new cont helpers
Rework the generic block "cont" routines to handle the new aops. Supporting cont_prepare_write would take quite a lot of code to support, so remove it instead (and we later convert all filesystems to use it). write_begin gets passed AOP_FLAG_CONT_EXPAND when called from generic_cont_expand, so filesystems can avoid the old hacks they used. Signed-off-by: Nick Piggin <npiggin@suse.de> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index ca04226bf1de..195339b27e9a 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1684,6 +1684,7 @@ size_t iov_iter_copy_from_user_atomic(struct page *page,
1684 1684
1685 return copied; 1685 return copied;
1686} 1686}
1687EXPORT_SYMBOL(iov_iter_copy_from_user_atomic);
1687 1688
1688/* 1689/*
1689 * This has the same sideeffects and return value as 1690 * This has the same sideeffects and return value as
@@ -1710,6 +1711,7 @@ size_t iov_iter_copy_from_user(struct page *page,
1710 kunmap(page); 1711 kunmap(page);
1711 return copied; 1712 return copied;
1712} 1713}
1714EXPORT_SYMBOL(iov_iter_copy_from_user);
1713 1715
1714static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes) 1716static void __iov_iter_advance_iov(struct iov_iter *i, size_t bytes)
1715{ 1717{
@@ -1741,6 +1743,7 @@ void iov_iter_advance(struct iov_iter *i, size_t bytes)
1741 __iov_iter_advance_iov(i, bytes); 1743 __iov_iter_advance_iov(i, bytes);
1742 i->count -= bytes; 1744 i->count -= bytes;
1743} 1745}
1746EXPORT_SYMBOL(iov_iter_advance);
1744 1747
1745/* 1748/*
1746 * Fault in the first iovec of the given iov_iter, to a maximum length 1749 * Fault in the first iovec of the given iov_iter, to a maximum length
@@ -1757,6 +1760,7 @@ int iov_iter_fault_in_readable(struct iov_iter *i, size_t bytes)
1757 bytes = min(bytes, i->iov->iov_len - i->iov_offset); 1760 bytes = min(bytes, i->iov->iov_len - i->iov_offset);
1758 return fault_in_pages_readable(buf, bytes); 1761 return fault_in_pages_readable(buf, bytes);
1759} 1762}
1763EXPORT_SYMBOL(iov_iter_fault_in_readable);
1760 1764
1761/* 1765/*
1762 * Return the count of just the current iov_iter segment. 1766 * Return the count of just the current iov_iter segment.
@@ -1769,6 +1773,7 @@ size_t iov_iter_single_seg_count(struct iov_iter *i)
1769 else 1773 else
1770 return min(i->count, iov->iov_len - i->iov_offset); 1774 return min(i->count, iov->iov_len - i->iov_offset);
1771} 1775}
1776EXPORT_SYMBOL(iov_iter_single_seg_count);
1772 1777
1773/* 1778/*
1774 * Performs necessary checks before doing a write 1779 * Performs necessary checks before doing a write