diff options
author | Steve French <sfrench@us.ibm.com> | 2008-03-03 23:22:00 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-03-03 23:22:00 -0500 |
commit | 966ea8c4b74aa6fde2d58c50a904619fd849ae93 (patch) | |
tree | 15f02bbcf6112575dbec30c3f7603a393b4dee3a /fs | |
parent | 41c5ae6898454277ec88e8e7278c8c58026363a3 (diff) | |
parent | 976dde010e513a9c7c3117a32b7b015f84b37430 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs')
-rw-r--r-- | fs/buffer.c | 3 | ||||
-rw-r--r-- | fs/exec.c | 10 | ||||
-rw-r--r-- | fs/jbd/transaction.c | 17 | ||||
-rw-r--r-- | fs/mpage.c | 11 |
4 files changed, 22 insertions, 19 deletions
diff --git a/fs/buffer.c b/fs/buffer.c index 3ebccf4aa7e3..897cd7477b34 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -627,8 +627,7 @@ repeat: | |||
627 | } | 627 | } |
628 | 628 | ||
629 | /** | 629 | /** |
630 | * sync_mapping_buffers - write out and wait upon a mapping's "associated" | 630 | * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers |
631 | * buffers | ||
632 | * @mapping: the mapping which wants those buffers written | 631 | * @mapping: the mapping which wants those buffers written |
633 | * | 632 | * |
634 | * Starts I/O against the buffers at mapping->private_list, and waits upon | 633 | * Starts I/O against the buffers at mapping->private_list, and waits upon |
@@ -173,8 +173,15 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | |||
173 | return NULL; | 173 | return NULL; |
174 | 174 | ||
175 | if (write) { | 175 | if (write) { |
176 | struct rlimit *rlim = current->signal->rlim; | ||
177 | unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; | 176 | unsigned long size = bprm->vma->vm_end - bprm->vma->vm_start; |
177 | struct rlimit *rlim; | ||
178 | |||
179 | /* | ||
180 | * We've historically supported up to 32 pages (ARG_MAX) | ||
181 | * of argument strings even with small stacks | ||
182 | */ | ||
183 | if (size <= ARG_MAX) | ||
184 | return page; | ||
178 | 185 | ||
179 | /* | 186 | /* |
180 | * Limit to 1/4-th the stack size for the argv+env strings. | 187 | * Limit to 1/4-th the stack size for the argv+env strings. |
@@ -183,6 +190,7 @@ static struct page *get_arg_page(struct linux_binprm *bprm, unsigned long pos, | |||
183 | * - the program will have a reasonable amount of stack left | 190 | * - the program will have a reasonable amount of stack left |
184 | * to work from. | 191 | * to work from. |
185 | */ | 192 | */ |
193 | rlim = current->signal->rlim; | ||
186 | if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { | 194 | if (size > rlim[RLIMIT_STACK].rlim_cur / 4) { |
187 | put_page(page); | 195 | put_page(page); |
188 | return NULL; | 196 | return NULL; |
diff --git a/fs/jbd/transaction.c b/fs/jbd/transaction.c index 038ed7436199..c6cbb6cd59b2 100644 --- a/fs/jbd/transaction.c +++ b/fs/jbd/transaction.c | |||
@@ -369,7 +369,7 @@ out: | |||
369 | 369 | ||
370 | 370 | ||
371 | /** | 371 | /** |
372 | * int journal_restart() - restart a handle . | 372 | * int journal_restart() - restart a handle. |
373 | * @handle: handle to restart | 373 | * @handle: handle to restart |
374 | * @nblocks: nr credits requested | 374 | * @nblocks: nr credits requested |
375 | * | 375 | * |
@@ -844,8 +844,7 @@ out: | |||
844 | } | 844 | } |
845 | 845 | ||
846 | /** | 846 | /** |
847 | * int journal_get_undo_access() - Notify intent to modify metadata with | 847 | * int journal_get_undo_access() - Notify intent to modify metadata with non-rewindable consequences |
848 | * non-rewindable consequences | ||
849 | * @handle: transaction | 848 | * @handle: transaction |
850 | * @bh: buffer to undo | 849 | * @bh: buffer to undo |
851 | * @credits: store the number of taken credits here (if not NULL) | 850 | * @credits: store the number of taken credits here (if not NULL) |
@@ -921,12 +920,14 @@ out: | |||
921 | } | 920 | } |
922 | 921 | ||
923 | /** | 922 | /** |
924 | * int journal_dirty_data() - mark a buffer as containing dirty data which | 923 | * int journal_dirty_data() - mark a buffer as containing dirty data to be flushed |
925 | * needs to be flushed before we can commit the | ||
926 | * current transaction. | ||
927 | * @handle: transaction | 924 | * @handle: transaction |
928 | * @bh: bufferhead to mark | 925 | * @bh: bufferhead to mark |
929 | * | 926 | * |
927 | * Description: | ||
928 | * Mark a buffer as containing dirty data which needs to be flushed before | ||
929 | * we can commit the current transaction. | ||
930 | * | ||
930 | * The buffer is placed on the transaction's data list and is marked as | 931 | * The buffer is placed on the transaction's data list and is marked as |
931 | * belonging to the transaction. | 932 | * belonging to the transaction. |
932 | * | 933 | * |
@@ -1098,11 +1099,11 @@ no_journal: | |||
1098 | } | 1099 | } |
1099 | 1100 | ||
1100 | /** | 1101 | /** |
1101 | * int journal_dirty_metadata() - mark a buffer as containing dirty metadata | 1102 | * int journal_dirty_metadata() - mark a buffer as containing dirty metadata |
1102 | * @handle: transaction to add buffer to. | 1103 | * @handle: transaction to add buffer to. |
1103 | * @bh: buffer to mark | 1104 | * @bh: buffer to mark |
1104 | * | 1105 | * |
1105 | * mark dirty metadata which needs to be journaled as part of the current | 1106 | * Mark dirty metadata which needs to be journaled as part of the current |
1106 | * transaction. | 1107 | * transaction. |
1107 | * | 1108 | * |
1108 | * The buffer is placed on the transaction's metadata list and is marked | 1109 | * The buffer is placed on the transaction's metadata list and is marked |
diff --git a/fs/mpage.c b/fs/mpage.c index 5df564366f36..235e4d3873a8 100644 --- a/fs/mpage.c +++ b/fs/mpage.c | |||
@@ -325,16 +325,12 @@ confused: | |||
325 | } | 325 | } |
326 | 326 | ||
327 | /** | 327 | /** |
328 | * mpage_readpages - populate an address space with some pages, and | 328 | * mpage_readpages - populate an address space with some pages & start reads against them |
329 | * start reads against them. | ||
330 | * | ||
331 | * @mapping: the address_space | 329 | * @mapping: the address_space |
332 | * @pages: The address of a list_head which contains the target pages. These | 330 | * @pages: The address of a list_head which contains the target pages. These |
333 | * pages have their ->index populated and are otherwise uninitialised. | 331 | * pages have their ->index populated and are otherwise uninitialised. |
334 | * | ||
335 | * The page at @pages->prev has the lowest file offset, and reads should be | 332 | * The page at @pages->prev has the lowest file offset, and reads should be |
336 | * issued in @pages->prev to @pages->next order. | 333 | * issued in @pages->prev to @pages->next order. |
337 | * | ||
338 | * @nr_pages: The number of pages at *@pages | 334 | * @nr_pages: The number of pages at *@pages |
339 | * @get_block: The filesystem's block mapper function. | 335 | * @get_block: The filesystem's block mapper function. |
340 | * | 336 | * |
@@ -360,6 +356,7 @@ confused: | |||
360 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be | 356 | * So an mpage read of the first 16 blocks of an ext2 file will cause I/O to be |
361 | * submitted in the following order: | 357 | * submitted in the following order: |
362 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 | 358 | * 12 0 1 2 3 4 5 6 7 8 9 10 11 13 14 15 16 |
359 | * | ||
363 | * because the indirect block has to be read to get the mappings of blocks | 360 | * because the indirect block has to be read to get the mappings of blocks |
364 | * 13,14,15,16. Obviously, this impacts performance. | 361 | * 13,14,15,16. Obviously, this impacts performance. |
365 | * | 362 | * |
@@ -656,9 +653,7 @@ out: | |||
656 | } | 653 | } |
657 | 654 | ||
658 | /** | 655 | /** |
659 | * mpage_writepages - walk the list of dirty pages of the given | 656 | * mpage_writepages - walk the list of dirty pages of the given address space & writepage() all of them |
660 | * address space and writepage() all of them. | ||
661 | * | ||
662 | * @mapping: address space structure to write | 657 | * @mapping: address space structure to write |
663 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write | 658 | * @wbc: subtract the number of written pages from *@wbc->nr_to_write |
664 | * @get_block: the filesystem's block mapper function. | 659 | * @get_block: the filesystem's block mapper function. |