linux-next: build failure after merge of the vfs tree
Subsystems (2)
Hi Al,
After merging the vfs tree, today's linux-next build (x86_64 allmodconfig) failed like this:
fs/f2fs/namei.c: In function 'f2fs_encrypted_follow_link':fs/f2fs/namei.c:336:10: warning: passing argument 2 of 'f2fs_follow_link' from incompatible pointer type
return f2fs_follow_link(dentry, nd);
^
fs/f2fs/namei.c:311:20: note: expected 'void **' but argument is of type 'struct nameidata *'
static const char *f2fs_follow_link(struct dentry *dentry, void **cookie)
^fs/f2fs/namei.c:336:3: warning: return discards 'const' qualifier from pointer target type
return f2fs_follow_link(dentry, nd);
^fs/f2fs/namei.c:379:2: error: implicit declaration of function 'nd_set_link' [-Werror=implicit-function-declaration]
nd_set_link(nd, paddr);
^fs/f2fs/namei.c: In function 'f2fs_encrypted_put_link':fs/f2fs/namei.c:400:3: error: implicit declaration of function 'nd_get_link' [-Werror=implicit-function-declaration]
kfree(nd_get_link(nd));
^fs/f2fs/namei.c:400:3: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast In file included from fs/f2fs/f2fs.h:17:0,
from fs/f2fs/namei.c:19:
include/linux/slab.h:143:6: note: expected 'const void *' but argument is of type 'int'
void kfree(const void *);
^fs/f2fs/namei.c: At top level:fs/f2fs/namei.c:960:2: warning: initialization from incompatible pointer type
.follow_link = f2fs_encrypted_follow_link,
^fs/f2fs/namei.c:960:2: warning: (near initialization for 'f2fs_symlink_inode_operations.follow_link') fs/f2fs/namei.c:961:2: warning: initialization from incompatible pointer type
.put_link = f2fs_encrypted_put_link,
^fs/f2fs/namei.c:961:2: warning: (near initialization for 'f2fs_symlink_inode_operations.put_link')
Caused by commits cf41cea5a829 ("new ->follow_link() and ->put_link() calling conventions") and 0ad7e33ea980 ("don't pass nameidata to ->follow_link()") from teh vfs tree interacting with commit 5270e98c341b ("f2fs crypto: add symlink encryption") from the f2fs tree.
I applied the following merge fix patch (which I suspect is not completely correct - especially the f2fs_encrypted_put_link part):
From: Stephen Rothwell <[email protected]>
Date: Mon, 11 May 2015 11:22:19 +1000
Subject: [PATCH] f2fs: merge fix for follow_link and put_link changes
--- fs/f2fs/namei.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)
fs/f2fs/namei.c +7 -11
@@ -320,8 +320,8 @@ static const char *f2fs_follow_link(struct dentry *dentry, void **cookie) }#ifdef CONFIG_F2FS_FS_ENCRYPTION -static void *f2fs_encrypted_follow_link (struct dentry *dentry, -struct nameidata *nd) +static const char *f2fs_encrypted_follow_link (struct dentry *dentry, +void **cookie) {struct page *cpage =NULL ;char *caddr, *paddr =NULL ;
@@ -333,7 +333,7 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry,u32 max_size = inode->i_sb->s_blocksize;if (!f2fs_encrypted_inode (inode)) -return f2fs_follow_link (dentry, nd); +return f2fs_follow_link (dentry, cookie); res =f2fs_setup_fname_crypto (inode);if (res)
@@ -341,7 +341,7 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry, cpage =read_mapping_page (inode->i_mapping,0 ,NULL );if (IS_ERR (cpage)) -return cpage; +return ERR_CAST (cpage); caddr =kmap (cpage); caddr[size] =0 ;
@@ -376,12 +376,11 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry,/* Null-terminate the name */ if (res <= cstr.len) paddr[res] ='\0' ; -nd_set_link (nd, paddr);if (cpage) {kunmap (cpage);page_cache_release (cpage); } -return NULL ; +return *cookie = paddr; errout:if (cpage) {kunmap (cpage);
@@ -391,14 +390,11 @@ errout:return ERR_PTR (res); } -static void f2fs_encrypted_put_link (struct dentry *dentry,struct nameidata *nd, -void *cookie) +static void f2fs_encrypted_put_link (struct dentry *dentry,void *cookie) {struct page *page = cookie; -if (!page) { -kfree (nd_get_link (nd)); - }else { +if (page) {kunmap (page);page_cache_release (page); }
Signature · 5 lines
2.1.4 -- Cheers, Stephen Rothwell [email protected]
Hi all,
Quoted 120 lines · On Mon, 11 May 2015 11:26:12 +1000 Stephen Rothwell <[email protected]>…
After merging the vfs tree, today's linux-next build (
x86_64allmodconfig) failed like this:
fs/f2fs/namei.c: In function 'f2fs_encrypted_follow_link':fs/f2fs/namei.c:336:10: warning: passing argument 2 of 'f2fs_follow_link' from incompatible pointer typereturn f2fs_follow_link(dentry, nd); ^ fs/f2fs/namei.c:311:20: note: expected 'void **' but argument is of type 'struct nameidata *' static const char *f2fs_follow_link(struct dentry *dentry, void **cookie) ^ fs/f2fs/namei.c:336:3: warning: return discards 'const' qualifier from pointer target type return f2fs_follow_link(dentry, nd); ^
fs/f2fs/namei.c:379:2: error: implicit declaration of function 'nd_set_link' [-Werror=implicit-function-declaration]
nd_set_link(nd, paddr);
^fs/f2fs/namei.c: In function 'f2fs_encrypted_put_link':fs/f2fs/namei.c:400:3: error: implicit declaration of function 'nd_get_link' [-Werror=implicit-function-declaration]kfree(nd_get_link(nd)); ^ fs/f2fs/namei.c:400:3: warning: passing argument 1 of 'kfree' makes pointer from integer without a cast In file included from fs/f2fs/f2fs.h:17:0, from fs/f2fs/namei.c:19: include/linux/slab.h:143:6: note: expected 'const void *' but argument is of type 'int' void kfree(const void *); ^
fs/f2fs/namei.c: At top level:fs/f2fs/namei.c:960:2: warning: initialization from incompatible pointer type
.follow_link =f2fs_encrypted_follow_link,
^fs/f2fs/namei.c:960:2: warning: (near initialization for 'f2fs_symlink_inode_operations.follow_link')fs/f2fs/namei.c:961:2: warning: initialization from incompatible pointer type
.put_link =f2fs_encrypted_put_link,
^fs/f2fs/namei.c:961:2: warning: (near initialization for 'f2fs_symlink_inode_operations.put_link')Caused by commits
cf41cea5a829("new ->follow_link() and ->put_link() calling conventions") and0ad7e33ea980("don't pass nameidata to ->follow_link()") from teh vfs tree interacting with commit5270e98c341b("f2fs crypto: add symlink encryption") from the f2fs tree.I applied the following merge fix patch (which I suspect is not completely correct - especially the
f2fs_encrypted_put_linkpart):From: Stephen Rothwell <[email protected]>
Date: Mon, 11 May 2015 11:22:19 +1000
Subject: [PATCH] f2fs: merge fix forfollow_linkandput_linkchangesSigned-off-by Stephen Rothwell <[email protected]>--- fs/f2fs/namei.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-)fs/f2fs/namei.c +7
-11@@ -320,8 +320,8 @@ static const char *f2fs_follow_link(struct dentry *dentry, void **cookie) }#ifdef CONFIG_F2FS_FS_ENCRYPTION -static void *f2fs_encrypted_follow_link (struct dentry *dentry, -struct nameidata *nd) +static const char *f2fs_encrypted_follow_link (struct dentry *dentry, +void **cookie) {struct page *cpage =NULL ;char *caddr, *paddr =NULL ;@@ -333,7 +333,7 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry,u32 max_size = inode->i_sb->s_blocksize;if (!f2fs_encrypted_inode (inode)) -return f2fs_follow_link (dentry, nd); +return f2fs_follow_link (dentry, cookie); res =f2fs_setup_fname_crypto (inode);if (res)@@ -341,7 +341,7 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry, cpage =read_mapping_page (inode->i_mapping,0 ,NULL );if (IS_ERR (cpage)) -return cpage; +return ERR_CAST (cpage); caddr =kmap (cpage); caddr[size] =0 ;@@ -376,12 +376,11 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry,/* Null-terminate the name */ if (res <= cstr.len) paddr[res] ='\0' ; -nd_set_link (nd, paddr);if (cpage) {kunmap (cpage);page_cache_release (cpage); } -return NULL ; +return *cookie = paddr; errout:if (cpage) {kunmap (cpage);@@ -391,14 +390,11 @@ errout:return ERR_PTR (res); } -static void f2fs_encrypted_put_link (struct dentry *dentry,struct nameidata *nd, -void *cookie) +static void f2fs_encrypted_put_link (struct dentry *dentry,void *cookie) {struct page *page = cookie; -if (!page) { -kfree (nd_get_link (nd)); - }else { +if (page) {kunmap (page);page_cache_release (page); }Signature · 1 line
2.1.4
This merge fix patch is now:
From: Stephen Rothwell <[email protected]>
Date: Wed, 13 May 2015 11:03:18 +1000
Subject: [PATCH] f2fs: merge fix for follow_link changes
--- fs/f2fs/namei.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
fs/f2fs/namei.c +4 -5
@@ -859,8 +859,8 @@ out: }#ifdef CONFIG_F2FS_FS_ENCRYPTION -static void *f2fs_encrypted_follow_link (struct dentry *dentry, -struct nameidata *nd) +static const char *f2fs_encrypted_follow_link (struct dentry *dentry, +void **cookie) {struct page *cpage =NULL ;char *caddr, *paddr =NULL ;
@@ -878,7 +878,7 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry, cpage =read_mapping_page (inode->i_mapping,0 ,NULL );if (IS_ERR (cpage)) -return cpage; +return ERR_CAST (cpage); caddr =kmap (cpage); caddr[size] =0 ;
@@ -912,11 +912,10 @@ static void *f2fs_encrypted_follow_link(struct dentry *dentry,/* Null-terminate the name */ if (res <= cstr.len) paddr[res] ='\0' ; -nd_set_link (nd, paddr);kunmap (cpage);page_cache_release (cpage); -return NULL ; +return *cookie = paddr; errout:f2fs_fname_crypto_free_buffer (&pstr);kunmap (cpage);
Signature · 5 lines
2.1.4 -- Cheers, Stephen Rothwell [email protected]