-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
well, I found the problem... It's a patch applied by OpenSUSE to the
kernel related to apparmor (the SUSE version of SELinux)... Here's the
patch regarding the "vfs_symlink" function:
########### START ##############
Add a struct vfsmount parameter to vfs_symlink()
Signed-off-by: Tony Jones <[EMAIL PROTECTED]>
Signed-off-by: Andreas Gruenbacher <[EMAIL PROTECTED]>
Index: b/fs/ecryptfs/inode.c
===================================================================
- --- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
@@ -470,6 +470,7 @@ static int ecryptfs_symlink(struct inode
{
int rc;
struct dentry *lower_dentry;
+ struct vfsmount *lower_mnt;
struct dentry *lower_dir_dentry;
umode_t mode;
char *encoded_symname;
@@ -478,6 +479,7 @@ static int ecryptfs_symlink(struct inode
lower_dentry = ecryptfs_dentry_to_lower(dentry);
dget(lower_dentry);
+ lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
lower_dir_dentry = lock_parent(lower_dentry);
mode = S_IALLUGO;
encoded_symlen = ecryptfs_encode_filename(crypt_stat, symname,
@@ -487,7 +489,7 @@ static int ecryptfs_symlink(struct inode
rc = encoded_symlen;
goto out_lock;
}
- - rc = vfs_symlink(lower_dir_dentry->d_inode, lower_dentry,
+ rc = vfs_symlink(lower_dir_dentry->d_inode, lower_dentry, lower_mnt,
encoded_symname, mode);
kfree(encoded_symname);
if (rc || !lower_dentry->d_inode)
Index: b/fs/namei.c
===================================================================
- --- a/fs/namei.c
+++ b/fs/namei.c
@@ -2185,7 +2185,8 @@ asmlinkage long sys_unlink(const char __
return do_unlinkat(AT_FDCWD, pathname);
}
- -int vfs_symlink(struct inode *dir, struct dentry *dentry, const char
*oldname, int mode)
+int vfs_symlink(struct inode *dir, struct dentry *dentry, struct
vfsmount *mnt,
+ const char *oldname, int mode)
{
int error = may_create(dir, dentry, NULL);
@@ -2231,7 +2232,8 @@ asmlinkage long sys_symlinkat(const char
if (IS_ERR(dentry))
goto out_unlock;
- - error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO);
+ error = vfs_symlink(nd.dentry->d_inode, dentry, nd.mnt, from,
+ S_IALLUGO);
dput(dentry);
out_unlock:
mutex_unlock(&nd.dentry->d_inode->i_mutex);
Index: b/fs/nfsd/vfs.c
===================================================================
- --- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1435,6 +1435,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
struct iattr *iap)
{
struct dentry *dentry, *dnew;
+ struct vfsmount *mnt;
__be32 err, cerr;
int host_err;
umode_t mode;
@@ -1461,6 +1462,7 @@ nfsd_symlink(struct svc_rqst *rqstp, str
if (iap && (iap->ia_valid & ATTR_MODE))
mode = iap->ia_mode & S_IALLUGO;
+ mnt = fhp->fh_export->ex_mnt;
if (unlikely(path[plen] != 0)) {
char *path_alloced = kmalloc(plen+1, GFP_KERNEL);
if (path_alloced == NULL)
@@ -1468,11 +1470,12 @@ nfsd_symlink(struct svc_rqst *rqstp, str
else {
strncpy(path_alloced, path, plen);
path_alloced[plen] = 0;
- - host_err = vfs_symlink(dentry->d_inode, dnew,
path_alloced, mode);
+ host_err = vfs_symlink(dentry->d_inode, dnew, mnt,
+ path_alloced, mode);
kfree(path_alloced);
}
} else
- - host_err = vfs_symlink(dentry->d_inode, dnew, path, mode);
+ host_err = vfs_symlink(dentry->d_inode, dnew, mnt, path,
mode);
if (!host_err) {
if (EX_ISSYNC(fhp->fh_export))
Index: b/include/linux/fs.h
===================================================================
- --- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -982,7 +982,7 @@ extern int vfs_permission(struct nameida
extern int vfs_create(struct inode *, struct dentry *, int, struct
nameidata *);
extern int vfs_mkdir(struct inode *, struct dentry *, struct vfsmount
*, int);
extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount
*, int, dev_t);
- -extern int vfs_symlink(struct inode *, struct dentry *, const char *,
int);
+extern int vfs_symlink(struct inode *, struct dentry *, struct vfsmount
*, const char *, int);
extern int vfs_link(struct dentry *, struct inode *, struct dentry *);
########### END ################
Can you help me make a patch so that aufs compiles in this kernel? That
way a patch for aufs to compile in OpenSUSE 10.3 will be already done.
Thanks in advance
Flávio Moringa
Technical Consultant
______________________________________________
Caixa Mágica Software
Energia Open Source
______________________________________________
Caixa Mágica Software
Edifício Espanha - Rua Soeiro Pereira Gomes
Lote 1 - 8ºFA, 1600-196 LISBOA
Portugal
Tel. +351 217 921 260
Fax. +351 217 921 261
http://www.caixamagica.pt
Sandino Flores Moreno wrote:
> I have applied the most recent patch of aufs (20070402) to
> 2.6.21-rc5-git11and the kernel compiled fine.
>
> So, the error you are seeing is not due to aufs.
>
> 2007/4/4, Flávio Moringa <[EMAIL PROTECTED]>:
>>
> Hi,
>
>
> I'm using the cvs version I downloaded today, so it's version 1.14.
>
> I'll take a look at the macros you said.
>
> Concerning the vfsmounts.. I'm sorry I really have no clue... It could
> be a patch made by opensuse... but I really don't know...
>
>
>
> Flávio Moringa
> Technical Consultant
> ______________________________________________
>
> Caixa Mágica Software
> Energia Open Source
> ______________________________________________
>
> Caixa Mágica Software
> Edifício Espanha - Rua Soeiro Pereira Gomes
> Lote 1 - 8ºFA, 1600-196 LISBOA
> Portugal
> Tel. +351 217 921 260
> Fax. +351 217 921 261
>
> http://www.caixamagica.pt
>
>
> [EMAIL PROTECTED] wrote:
>> Hello Flavio,
>
>> Flvio_Moringa:
>>> i'm trying to compile aufs in kernel 2.6.21-rc5-git6-2 (in openSUSE
> 10.3
>>> alpha 2).
>
>>> It seems the file vfssub.h needs to be patched because all the VFS
>>> helper functions from the kernel code have an extra argument (of type
>>> struct vfmount)... here's the errors:
>
>> Which version are you using?
>> I could not find new arguments in
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git.
>
>
>>> Any help on how can I create the patch?
>
>> How about macros as Wilhelm Meier did for vserver, which was posted a
>> week ago?
>
>> But two vfsmount pointers are strange, especially for vfs_link and
>> vfs_rename. Because those two vfsmounts must be identical. Do you how
>> and why they are used for?
>
>
>> Junjiro Okajima
>>
- -------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share
your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFGFMkIhwzhH30HeBERAlfmAKC3VgbVDD4vXYI+Z2dQS8aPG2LnjQCfbT4F
v/1Pl2Kdkt3RCAprx577Dk4=
=70kS
-----END PGP SIGNATURE-----
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV