--- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1224,7 +1224,8 @@ static inline int check_sticky(struct in * 10. We don't allow removal of NFS sillyrenamed files; it's handled by * nfs_async_unlink(). */ -static inline int may_delete(struct inode *dir,struct dentry *victim,int isdir) +static inline int may_delete(struct inode *dir, struct dentry *victim, + int isdir, struct nameidata *nd) { int error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1233,7 +1234,7 @@ static inline int may_delete(struct inod BUG_ON(victim->d_parent->d_inode != dir); - error = permission(dir,MAY_WRITE | MAY_EXEC, NULL); + error = permission(dir,MAY_WRITE | MAY_EXEC, nd); if (error) return error; if (IS_APPEND(dir)) --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1662,9 +1664,10 @@ fail: } EXPORT_SYMBOL_GPL(lookup_create); -int vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t dev) +int vfs_mknod(struct inode *dir, struct dentry *dentry, + int mode, dev_t dev, struct nameidata *nd) { - int error = may_create(dir, dentry, NULL); + int error = may_create(dir, dentry, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1706,7 +1709,6 @@ asmlinkage long sys_mknod(const char __u goto out; dentry = lookup_create(&nd, 0); error = PTR_ERR(dentry); - if (!IS_POSIXACL(nd.dentry->d_inode)) mode &= ~current->fs->umask; if (!IS_ERR(dentry)) { --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1715,11 +1717,12 @@ asmlinkage long sys_mknod(const char __u error = vfs_create(nd.dentry->d_inode,dentry,mode,&nd); break; case S_IFCHR: case S_IFBLK: - error = vfs_mknod(nd.dentry->d_inode,dentry,mode, - new_decode_dev(dev)); + error = vfs_mknod(nd.dentry->d_inode, dentry, mode, + new_decode_dev(dev), &nd); break; case S_IFIFO: case S_IFSOCK: - error = vfs_mknod(nd.dentry->d_inode,dentry,mode,0); + error = vfs_mknod(nd.dentry->d_inode, dentry, mode, + 0, &nd); break; case S_IFDIR: error = -EPERM; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1737,9 +1740,10 @@ out: return error; } -int vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) +int vfs_mkdir(struct inode *dir, struct dentry *dentry, + int mode, struct nameidata *nd) { - int error = may_create(dir, dentry, NULL); + int error = may_create(dir, dentry, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1780,7 +1784,8 @@ asmlinkage long sys_mkdir(const char __u if (!IS_ERR(dentry)) { if (!IS_POSIXACL(nd.dentry->d_inode)) mode &= ~current->fs->umask; - error = vfs_mkdir(nd.dentry->d_inode, dentry, mode); + error = vfs_mkdir(nd.dentry->d_inode, dentry, + mode, &nd); dput(dentry); } up(&nd.dentry->d_inode->i_sem); --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1820,9 +1825,10 @@ void dentry_unhash(struct dentry *dentry spin_unlock(&dcache_lock); } -int vfs_rmdir(struct inode *dir, struct dentry *dentry) +int vfs_rmdir(struct inode *dir, struct dentry *dentry, + struct nameidata *nd) { - int error = may_delete(dir, dentry, 1); + int error = may_delete(dir, dentry, 1, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1883,7 +1889,7 @@ asmlinkage long sys_rmdir(const char __u dentry = lookup_hash(&nd.last, nd.dentry); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { - error = vfs_rmdir(nd.dentry->d_inode, dentry); + error = vfs_rmdir(nd.dentry->d_inode, dentry, &nd); dput(dentry); } up(&nd.dentry->d_inode->i_sem); --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1894,9 +1900,10 @@ exit: return error; } -int vfs_unlink(struct inode *dir, struct dentry *dentry) +int vfs_unlink(struct inode *dir, struct dentry *dentry, + struct nameidata *nd) { - int error = may_delete(dir, dentry, 0); + int error = may_delete(dir, dentry, 0, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1958,7 +1965,7 @@ asmlinkage long sys_unlink(const char __ inode = dentry->d_inode; if (inode) atomic_inc(&inode->i_count); - error = vfs_unlink(nd.dentry->d_inode, dentry); + error = vfs_unlink(nd.dentry->d_inode, dentry, &nd); exit2: dput(dentry); } --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -1977,9 +1984,10 @@ slashes: goto exit2; } -int vfs_symlink(struct inode *dir, struct dentry *dentry, const char *oldname, int mode) +int vfs_symlink(struct inode *dir, struct dentry *dentry, + const char *oldname, int mode, struct nameidata *nd) { - int error = may_create(dir, dentry, NULL); + int error = may_create(dir, dentry, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -2021,7 +2029,8 @@ asmlinkage long sys_symlink(const char _ dentry = lookup_create(&nd, 0); error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { - error = vfs_symlink(nd.dentry->d_inode, dentry, from, S_IALLUGO); + error = vfs_symlink(nd.dentry->d_inode, dentry, + from, S_IALLUGO, &nd); dput(dentry); } up(&nd.dentry->d_inode->i_sem); --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -2033,7 +2042,8 @@ out: return error; } -int vfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *new_dentry) +int vfs_link(struct dentry *old_dentry, struct inode *dir, + struct dentry *new_dentry, struct nameidata *nd) { struct inode *inode = old_dentry->d_inode; int error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -2041,7 +2051,7 @@ int vfs_link(struct dentry *old_dentry, if (!inode) return -ENOENT; - error = may_create(dir, new_dentry, NULL); + error = may_create(dir, new_dentry, nd); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -2105,7 +2115,8 @@ asmlinkage long sys_link(const char __us new_dentry = lookup_create(&nd, 0); error = PTR_ERR(new_dentry); if (!IS_ERR(new_dentry)) { - error = vfs_link(old_nd.dentry, nd.dentry->d_inode, new_dentry); + error = vfs_link(old_nd.dentry, nd.dentry->d_inode, + new_dentry, &nd); dput(new_dentry); } up(&nd.dentry->d_inode->i_sem); --- linux-2.6.13-vs2.0.1/fs/namei.c 2005-08-29 22:42:13 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/namei.c 2005-09-14 03:39:57 +0200 @@ -2236,14 +2247,14 @@ int vfs_rename(struct inode *old_dir, st if (old_dentry->d_inode == new_dentry->d_inode) return 0; - error = may_delete(old_dir, old_dentry, is_dir); + error = may_delete(old_dir, old_dentry, is_dir, NULL); if (error) return error; if (!new_dentry->d_inode) error = may_create(new_dir, new_dentry, NULL); else - error = may_delete(new_dir, new_dentry, is_dir); + error = may_delete(new_dir, new_dentry, is_dir, NULL); if (error) return error; --- linux-2.6.13-vs2.0.1/fs/nfsd/vfs.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/nfsd/vfs.c 2005-09-14 03:39:57 +0200 @@ -1154,13 +1154,13 @@ nfsd_create(struct svc_rqst *rqstp, stru err = vfs_create(dirp, dchild, iap->ia_mode, NULL); break; case S_IFDIR: - err = vfs_mkdir(dirp, dchild, iap->ia_mode); + err = vfs_mkdir(dirp, dchild, iap->ia_mode, NULL); break; case S_IFCHR: case S_IFBLK: case S_IFIFO: case S_IFSOCK: - err = vfs_mknod(dirp, dchild, iap->ia_mode, rdev); + err = vfs_mknod(dirp, dchild, iap->ia_mode, rdev, NULL); break; default: printk("nfsd: bad file type %o in nfsd_create\n", type); --- linux-2.6.13-vs2.0.1/fs/nfsd/vfs.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/nfsd/vfs.c 2005-09-14 03:39:57 +0200 @@ -1436,11 +1436,13 @@ nfsd_symlink(struct svc_rqst *rqstp, str else { strncpy(path_alloced, path, plen); path_alloced[plen] = 0; - err = vfs_symlink(dentry->d_inode, dnew, path_alloced, mode); + err = vfs_symlink(dentry->d_inode, dnew, + path_alloced, mode, NULL); kfree(path_alloced); } } else - err = vfs_symlink(dentry->d_inode, dnew, path, mode); + err = vfs_symlink(dentry->d_inode, dnew, + path, mode, NULL); if (!err) { if (EX_ISSYNC(fhp->fh_export)) --- linux-2.6.13-vs2.0.1/fs/nfsd/vfs.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/nfsd/vfs.c 2005-09-14 03:39:57 +0200 @@ -1498,7 +1500,7 @@ nfsd_link(struct svc_rqst *rqstp, struct dold = tfhp->fh_dentry; dest = dold->d_inode; - err = vfs_link(dold, dirp, dnew); + err = vfs_link(dold, dirp, dnew, NULL); if (!err) { if (EX_ISSYNC(ffhp->fh_export)) { nfsd_sync_dir(ddir); --- linux-2.6.13-vs2.0.1/fs/nfsd/vfs.c 2005-08-29 22:25:32 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/nfsd/vfs.c 2005-09-14 03:39:57 +0200 @@ -1659,9 +1661,9 @@ nfsd_unlink(struct svc_rqst *rqstp, stru err = nfserr_perm; } else #endif - err = vfs_unlink(dirp, rdentry); + err = vfs_unlink(dirp, rdentry, NULL); } else { /* It's RMDIR */ - err = vfs_rmdir(dirp, rdentry); + err = vfs_rmdir(dirp, rdentry, NULL); } dput(rdentry); --- linux-2.6.13-vs2.0.1/fs/reiserfs/xattr.c 2005-08-29 22:25:33 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/fs/reiserfs/xattr.c 2005-09-14 03:45:41 +0200 @@ -835,7 +835,7 @@ int reiserfs_delete_xattrs(struct inode if (dir->d_inode->i_nlink <= 2) { root = get_xa_root(inode->i_sb); reiserfs_write_lock_xattrs(inode->i_sb); - err = vfs_rmdir(root->d_inode, dir); + err = vfs_rmdir(root->d_inode, dir, NULL); reiserfs_write_unlock_xattrs(inode->i_sb); dput(root); } else { --- linux-2.6.13-vs2.0.1/include/linux/fs.h 2005-08-29 22:42:14 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/include/linux/fs.h 2005-09-14 03:39:57 +0200 @@ -881,12 +882,12 @@ static inline void unlock_super(struct s * VFS helper functions.. */ extern int vfs_create(struct inode *, struct dentry *, int, struct nameidata *); -extern int vfs_mkdir(struct inode *, struct dentry *, int); -extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t); -extern int vfs_symlink(struct inode *, struct dentry *, const char *, int); -extern int vfs_link(struct dentry *, struct inode *, struct dentry *); -extern int vfs_rmdir(struct inode *, struct dentry *); -extern int vfs_unlink(struct inode *, struct dentry *); +extern int vfs_mkdir(struct inode *, struct dentry *, int, struct nameidata *); +extern int vfs_mknod(struct inode *, struct dentry *, int, dev_t, struct nameidata *); +extern int vfs_symlink(struct inode *, struct dentry *, const char *, int, struct nameidata *); +extern int vfs_link(struct dentry *, struct inode *, struct dentry *, struct nameidata *); +extern int vfs_rmdir(struct inode *, struct dentry *, struct nameidata *); +extern int vfs_unlink(struct inode *, struct dentry *, struct nameidata *); extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); /* --- linux-2.6.13-vs2.0.1/ipc/mqueue.c 2005-08-29 22:42:14 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/ipc/mqueue.c 2005-09-14 03:39:57 +0200 @@ -738,7 +738,7 @@ asmlinkage long sys_mq_unlink(const char if (inode) atomic_inc(&inode->i_count); - err = vfs_unlink(dentry->d_parent->d_inode, dentry); + err = vfs_unlink(dentry->d_parent->d_inode, dentry, NULL); out_err: dput(dentry); --- linux-2.6.13-vs2.0.1/net/unix/af_unix.c 2005-08-29 22:42:14 +0200 +++ linux-2.6.13-vs2.0.1-bme0.06.1/net/unix/af_unix.c 2005-09-14 03:39:57 +0200 @@ -784,7 +784,7 @@ static int unix_bind(struct socket *sock */ mode = S_IFSOCK | (SOCK_INODE(sock)->i_mode & ~current->fs->umask); - err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0); + err = vfs_mknod(nd.dentry->d_inode, dentry, mode, 0, NULL); if (err) goto out_mknod_dput; up(&nd.dentry->d_inode->i_sem);