fs/nfs/direct.c: In function `nfs_get_user_pages':
fs/nfs/direct.c:110: warning: implicit declaration of function `nfs_free_user_pages'
fs/nfs/direct.c: At top level:
fs/nfs/direct.c:127: error: conflicting types for 'nfs_free_user_pages'
fs/nfs/direct.c:110: error: previous implicit declaration of 'nfs_free_user_pages' was here
make[2]: *** [fs/nfs/direct.o] Error 1
make[1]: *** [fs/nfs] Error 2
make: *** [fs] Error 2
Today, i saw the kernel 2.6.15.5 changelog and i notice that there were some changes in fs/nfs/direct.c which can be seen in official kernel website :
--- a/fs/nfs/direct.c+++ b/fs/nfs/direct.c@@ -106,6 +106,11 @@ nfs_get_user_pages(int rw, unsigned longresult = get_user_pages(current, current->mm, user_addr,page_count, (rw == READ), 0,*pages, NULL);+ if (result >= 0 && result <>+ nfs_free_user_pages(*pages, result, 0);+ *pages = NULL;+ result = -EFAULT;+ }up_read(¤t->mm->mmap_sem);}return result;
Note : + sign means addition
I think this line which causes the error messages. I have mailed Chris Wright, the maintainer for Stable kernel development, and i'll wait for his answer. For now, i'll just wait and use the 2.6.15.4 kernel as it doesn't have any problem at all for me.
UPDATE
Chris has replied my email and he has gave me a patch to fix this problem (this will be included in 2.6.15.6 in the future). Here are the patches :
fs/nfs/direct.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletion(-)
--- linux-2.6.15.5.orig/fs/nfs/direct.c
+++ linux-2.6.15.5/fs/nfs/direct.c
@@ -57,6 +57,7 @@
#define NFSDBG_FACILITY NFSDBG_VFS
#define MAX_DIRECTIO_SIZE (4096UL << result =" get_user_pages(current,">mm, user_addr,
page_count, (rw == READ), 0,
*pages, NULL);
+ up_read(¤t->mm->mmap_sem);
+ /*
+ * If we got fewer pages than expected from get_user_pages(),
+ * the user buffer runs off the end of a mapping; return EFAULT.
+ */
if (result >= 0 && result < pages =" NULL;" result =" -EFAULT;">mm->mmap_sem);
}
return result;
}
No comments:
Post a Comment