hostfs: fix a duplicated global function name
PATCH 1/1 hostfs: fix a duplicated global function name
fs/hostfs/hostfs_user.c defines do_readlink() as non-static, and so does fs/xfs/linux-2.6/xfs_ioctl.c when CONFIG_XFS_DEBUG=y. So rename do_readlink() in hostfs to hostfs_do_readlink().
I think it's better if XFS guys will also rename their do_readlink(), it's not necessary to use such a general name.
Compile test only.
---
fs/hostfs/hostfs.h +1 -1
@@ -81,7 +81,7 @@ extern int do_rmdir(const char *file);extern int do_mknod (const char *file,int mode,unsigned int major,unsigned int minor);extern int link_file (const char *from,const char *to); -extern int do_readlink (char *file,char *buf,int size); +extern int hostfs_do_readlink (char *file,char *buf,int size);extern int rename_file (char *from,char *to); extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, long long *bfree_out, long long *bavail_out,
fs/hostfs/hostfs_kern.c +2 -2
@@ -168,7 +168,7 @@ static char *follow_link(char *link)if (name ==NULL ) goto out; - n =do_readlink (link, name, len); + n =hostfs_do_readlink (link, name, len);if (n < len)break ; len *=2 ;
@@ -943,7 +943,7 @@ int hostfs_link_readpage(struct file *file, struct page *page) name =inode_name (page->mapping->host,0 );if (name ==NULL )return -ENOMEM ; - err =do_readlink (name, buffer,PAGE_CACHE_SIZE ); + err =hostfs_do_readlink (name, buffer,PAGE_CACHE_SIZE );kfree (name);if (err ==PAGE_CACHE_SIZE ) err = -E2BIG ;
fs/hostfs/hostfs_user.c +1 -1
@@ -377,7 +377,7 @@ int link_file(const char *to, const char *from)return 0 ; } -int do_readlink (char *file,char *buf,int size) +int hostfs_do_readlink (char *file,char *buf,int size) {int n;
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 4 lines · On Tue, 18 Nov 2008 18:00:03 +0000 Am__rico Wang <[email protected]>…
fs/hostfs/hostfs_user.cdefinesdo_readlink()as non-static, and so doesfs/xfs/linux-2.6/xfs_ioctl.cwhenCONFIG_XFS_DEBUG=y. So renamedo_readlink()in hostfs tohostfs_do_readlink().
heh, yes, it's not a great choice of identifier.
Quoted 47 lines
I think it's better if XFS guys will also rename their
do_readlink(), it's not necessary to use such a general name.Compile test only.
...
fs/hostfs/hostfs.h +1
-1@@ -81,7 +81,7 @@ extern int do_rmdir(const char *file);extern int do_mknod (const char *file,int mode,unsigned int major,unsigned int minor);extern int link_file (const char *from,const char *to); -extern int do_readlink (char *file,char *buf,int size); +extern int hostfs_do_readlink (char *file,char *buf,int size);extern int rename_file (char *from,char *to); extern int do_statfs(char *root, long *bsize_out, long long *blocks_out, long long *bfree_out, long long *bavail_out,fs/hostfs/hostfs_kern.c +2
-2@@ -168,7 +168,7 @@ static char *follow_link(char *link)if (name ==NULL ) goto out; - n =do_readlink (link, name, len); + n =hostfs_do_readlink (link, name, len);if (n < len)break ; len *=2 ;@@ -943,7 +943,7 @@ int hostfs_link_readpage(struct file *file, struct page *page) name =inode_name (page->mapping->host,0 );if (name ==NULL )return -ENOMEM ; - err =do_readlink (name, buffer,PAGE_CACHE_SIZE ); + err =hostfs_do_readlink (name, buffer,PAGE_CACHE_SIZE );kfree (name);if (err ==PAGE_CACHE_SIZE ) err = -E2BIG ;fs/hostfs/hostfs_user.c +0
-0
fs/hostfs/hostfs_user.c int link_file(const char *to, const char *from) · line 382
Quoted 7 lines
fs/hostfs/hostfs_user.c +1
-1@@ -377,7 +377,7 @@ int link_file(const char *to, const char *from)return 0 ; } -int do_readlink (char *file,char *buf,int size) +int hostfs_do_readlink (char *file,char *buf,int size) {int n;
Thanks, I'll send this in for 2.6.28 unless someone stops me soon.
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel