lkml.org 
[lkml]   [2005]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch 21/39] remap_file_pages protection support: use EOVERFLOW ret code
From
Date

From: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>

Use -EOVERFLOW ("Value too large for defined data type") rather than -EINVAL
when we cannot store the file offset in the PTE.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
---

linux-2.6.git-paolo/mm/fremap.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)

diff -puN mm/fremap.c~rfp-ef2big-ret-code mm/fremap.c
--- linux-2.6.git/mm/fremap.c~rfp-ef2big-ret-code 2005-08-11 23:04:59.000000000 +0200
+++ linux-2.6.git-paolo/mm/fremap.c 2005-08-11 23:04:59.000000000 +0200
@@ -213,7 +213,7 @@ asmlinkage long sys_remap_file_pages(uns
/* Can we represent this offset inside this architecture's pte's? */
#if PTE_FILE_MAX_BITS < BITS_PER_LONG
if (pgoff + (size >> PAGE_SHIFT) >= (1UL << PTE_FILE_MAX_BITS))
- return err;
+ return -EOVERFLOW;
#endif

/* We need down_write() to change vma->vm_flags. */
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-08-12 20:51    [W:0.039 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site