On Wed, 14 Nov 2012 17:15:44 -0500
Nick Bowler <[email protected]> wrote:

> > Unfortunately there is no EKERNELSCREWEDUP,
> 
> Well, maybe we should add it! :P

Well.  Given how frequently it will be used, it would need to be a much
shorter identifier.  Perhaps "EEK".  Or just "E".

> > so we usually use EINVAL.
> 
> Fair enough.  I will prepare v2.  But perhaps EOPNOTSUPP would be a
> better fit?

I have queued a delta:

From: Andrew Morton <[email protected]>
Subject: scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error-fix

s/E2BIG/EINVAL/

Cc: Nick Bowler <[email protected]>
Cc: Maxim Levitsky <[email protected]>
Cc: Tejun Heo <[email protected]>
Cc: Jens Axboe <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 lib/scatterlist.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN 
lib/scatterlist.c~scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error-fix
 lib/scatterlist.c
--- 
a/lib/scatterlist.c~scatterlist-dont-bug-when-we-can-trivially-return-a-proper-error-fix
+++ a/lib/scatterlist.c
@@ -249,7 +249,7 @@ int __sg_alloc_table(struct sg_table *ta
 
 #ifndef ARCH_HAS_SG_CHAIN
        if (WARN_ON_ONCE(nents > max_ents))
-               return -E2BIG;
+               return -EINVAL;
 #endif
 
        memset(table, 0, sizeof(*table));
_

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to