Add a struct vfsmount parameter to vfs_unlink() Signed-off-by: Tony Jones Signed-off-by: Andreas Gruenbacher Index: linux-2.6.19/fs/ecryptfs/inode.c =================================================================== --- linux-2.6.19.orig/fs/ecryptfs/inode.c +++ linux-2.6.19/fs/ecryptfs/inode.c @@ -485,10 +485,11 @@ static int ecryptfs_unlink(struct inode { int rc = 0; struct dentry *lower_dentry = ecryptfs_dentry_to_lower(dentry); + struct vfsmount *lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry); struct inode *lower_dir_inode = ecryptfs_inode_to_lower(dir); lock_parent(lower_dentry); - rc = vfs_unlink(lower_dir_inode, lower_dentry); + rc = vfs_unlink(lower_dir_inode, lower_mnt, lower_dentry); if (rc) { printk(KERN_ERR "Error in vfs_unlink; rc = [%d]\n", rc); goto out_unlock; Index: linux-2.6.19/fs/namei.c =================================================================== --- linux-2.6.19.orig/fs/namei.c +++ linux-2.6.19/fs/namei.c @@ -2090,7 +2090,7 @@ asmlinkage long sys_rmdir(const char __u return do_rmdir(AT_FDCWD, pathname); } -int vfs_unlink(struct inode *dir, struct dentry *dentry) +int vfs_unlink(struct inode *dir, struct vfsmount *mnt, struct dentry *dentry) { int error = may_delete(dir, dentry, 0); @@ -2154,7 +2154,7 @@ static long do_unlinkat(int dfd, const c 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, nd.mnt, dentry); exit2: dput(dentry); } Index: linux-2.6.19/fs/nfsd/nfs4recover.c =================================================================== --- linux-2.6.19.orig/fs/nfsd/nfs4recover.c +++ linux-2.6.19/fs/nfsd/nfs4recover.c @@ -260,7 +260,7 @@ nfsd4_remove_clid_file(struct dentry *di return -EINVAL; } mutex_lock(&dir->d_inode->i_mutex); - status = vfs_unlink(dir->d_inode, dentry); + status = vfs_unlink(dir->d_inode, NULL, dentry); mutex_unlock(&dir->d_inode->i_mutex); return status; } Index: linux-2.6.19/fs/nfsd/vfs.c =================================================================== --- linux-2.6.19.orig/fs/nfsd/vfs.c +++ linux-2.6.19/fs/nfsd/vfs.c @@ -1703,7 +1703,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru host_err = -EPERM; } else #endif - host_err = vfs_unlink(dirp, rdentry); + host_err = vfs_unlink(dirp, NULL, rdentry); } else { /* It's RMDIR */ host_err = vfs_rmdir(dirp, NULL, rdentry); } Index: linux-2.6.19/include/linux/fs.h =================================================================== --- linux-2.6.19.orig/include/linux/fs.h +++ linux-2.6.19/include/linux/fs.h @@ -1018,7 +1018,7 @@ extern int vfs_mknod(struct inode *, str extern int vfs_symlink(struct inode *, struct vfsmount *, struct dentry *, const char *, int); extern int vfs_link(struct vfsmount *, struct dentry *, struct inode *, struct vfsmount *, struct dentry *); extern int vfs_rmdir(struct inode *, struct vfsmount *, struct dentry *); -extern int vfs_unlink(struct inode *, struct dentry *); +extern int vfs_unlink(struct inode *, struct vfsmount *, struct dentry *); extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *); /* Index: linux-2.6.19/ipc/mqueue.c =================================================================== --- linux-2.6.19.orig/ipc/mqueue.c +++ linux-2.6.19/ipc/mqueue.c @@ -747,7 +747,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, mqueue_mnt, dentry); out_err: dput(dentry);