lkml.org 
[lkml]   [2005]   [Aug]   [23]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateTue, 23 Aug 2005 11:46:33 +0300 (EEST)
FromPekka J Enberg <>
Subject[PATCH] mm: return ENOBUFS instead of ENOMEM in generic_file_buffered_write
As noticed by Dmitry Torokhov, write() can not return ENOMEM:

http://www.opengroup.org/onlinepubs/000095399/functions/write.html
Therefore fixup generic_file_buffered_write() in mm/filemap.c (pointed out by
Nathan Scott).

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
---
 filemap.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)
Index: 2.6-mm/mm/filemap.c
===================================================================
--- 2.6-mm.orig/mm/filemap.c
+++ 2.6-mm/mm/filemap.c
@@ -1942,7 +1942,7 @@ generic_file_buffered_write(struct kiocb
 
 		page = __grab_cache_page(mapping,index,&cached_page,&lru_pvec);
 		if (!page) {
-			status = -ENOMEM;
+			status = -ENOBUFS;
 			break;
 		}
 
-
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-23 10:52    [from the cache]
©2003-2008