2007-01-10 06:33:09 +00:00
|
|
|
Add a struct vfsmount parameter to vfs_rmdir()
|
|
|
|
|
|
|
|
Signed-off-by: Tony Jones <tonyj@suse.de>
|
|
|
|
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
|
|
|
|
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/fs/ecryptfs/inode.c
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/fs/ecryptfs/inode.c
|
|
|
|
+++ linux-2.6/fs/ecryptfs/inode.c
|
2007-02-01 05:28:52 +00:00
|
|
|
@@ -534,14 +534,16 @@ out:
|
2007-01-10 06:33:09 +00:00
|
|
|
static int ecryptfs_rmdir(struct inode *dir, struct dentry *dentry)
|
|
|
|
{
|
|
|
|
struct dentry *lower_dentry;
|
|
|
|
+ struct vfsmount *lower_mnt;
|
|
|
|
struct dentry *lower_dir_dentry;
|
|
|
|
int rc;
|
|
|
|
|
|
|
|
lower_dentry = ecryptfs_dentry_to_lower(dentry);
|
|
|
|
+ lower_mnt = ecryptfs_dentry_to_lower_mnt(dentry);
|
|
|
|
dget(dentry);
|
|
|
|
lower_dir_dentry = lock_parent(lower_dentry);
|
|
|
|
dget(lower_dentry);
|
|
|
|
- rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry);
|
2007-01-17 07:12:32 +00:00
|
|
|
+ rc = vfs_rmdir(lower_dir_dentry->d_inode, lower_dentry, lower_mnt);
|
2007-01-10 06:33:09 +00:00
|
|
|
dput(lower_dentry);
|
|
|
|
if (!rc)
|
|
|
|
d_delete(lower_dentry);
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/fs/namei.c
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/fs/namei.c
|
|
|
|
+++ linux-2.6/fs/namei.c
|
2007-02-01 05:28:52 +00:00
|
|
|
@@ -2006,7 +2006,7 @@ void dentry_unhash(struct dentry *dentry
|
2007-01-10 06:33:09 +00:00
|
|
|
spin_unlock(&dcache_lock);
|
|
|
|
}
|
|
|
|
|
|
|
|
-int vfs_rmdir(struct inode *dir, struct dentry *dentry)
|
2007-01-17 07:12:32 +00:00
|
|
|
+int vfs_rmdir(struct inode *dir, struct dentry *dentry,struct vfsmount *mnt)
|
2007-01-10 06:33:09 +00:00
|
|
|
{
|
|
|
|
int error = may_delete(dir, dentry, 1);
|
|
|
|
|
2007-02-01 05:28:52 +00:00
|
|
|
@@ -2070,7 +2070,7 @@ static long do_rmdir(int dfd, const char
|
2007-01-10 06:33:09 +00:00
|
|
|
error = PTR_ERR(dentry);
|
|
|
|
if (IS_ERR(dentry))
|
|
|
|
goto exit2;
|
|
|
|
- error = vfs_rmdir(nd.dentry->d_inode, dentry);
|
2007-01-17 07:12:32 +00:00
|
|
|
+ error = vfs_rmdir(nd.dentry->d_inode, dentry, nd.mnt);
|
2007-01-10 06:33:09 +00:00
|
|
|
dput(dentry);
|
|
|
|
exit2:
|
|
|
|
mutex_unlock(&nd.dentry->d_inode->i_mutex);
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/fs/nfsd/nfs4recover.c
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/fs/nfsd/nfs4recover.c
|
|
|
|
+++ linux-2.6/fs/nfsd/nfs4recover.c
|
2007-01-10 06:33:09 +00:00
|
|
|
@@ -275,7 +275,7 @@ nfsd4_clear_clid_dir(struct dentry *dir,
|
|
|
|
* a kernel from the future.... */
|
|
|
|
nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file);
|
|
|
|
mutex_lock_nested(&dir->d_inode->i_mutex, I_MUTEX_PARENT);
|
|
|
|
- status = vfs_rmdir(dir->d_inode, dentry);
|
2007-01-23 10:37:51 +00:00
|
|
|
+ status = vfs_rmdir(dir->d_inode, dentry, NULL);
|
2007-01-10 06:33:09 +00:00
|
|
|
mutex_unlock(&dir->d_inode->i_mutex);
|
|
|
|
return status;
|
|
|
|
}
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/fs/nfsd/vfs.c
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/fs/nfsd/vfs.c
|
|
|
|
+++ linux-2.6/fs/nfsd/vfs.c
|
|
|
|
@@ -1694,7 +1694,7 @@ nfsd_unlink(struct svc_rqst *rqstp, stru
|
2007-01-10 06:33:09 +00:00
|
|
|
#endif
|
|
|
|
host_err = vfs_unlink(dirp, rdentry);
|
|
|
|
} else { /* It's RMDIR */
|
|
|
|
- host_err = vfs_rmdir(dirp, rdentry);
|
2007-01-23 10:37:51 +00:00
|
|
|
+ host_err = vfs_rmdir(dirp, rdentry, NULL);
|
2007-01-10 06:33:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
dput(rdentry);
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/fs/reiserfs/xattr.c
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/fs/reiserfs/xattr.c
|
|
|
|
+++ linux-2.6/fs/reiserfs/xattr.c
|
2007-01-10 06:33:09 +00:00
|
|
|
@@ -823,7 +823,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);
|
2007-01-17 07:12:32 +00:00
|
|
|
+ err = vfs_rmdir(root->d_inode, dir, NULL);
|
2007-01-10 06:33:09 +00:00
|
|
|
reiserfs_write_unlock_xattrs(inode->i_sb);
|
|
|
|
dput(root);
|
|
|
|
} else {
|
2007-02-01 06:13:07 +00:00
|
|
|
Index: linux-2.6/include/linux/fs.h
|
2007-01-10 06:33:09 +00:00
|
|
|
===================================================================
|
2007-02-01 06:13:07 +00:00
|
|
|
--- linux-2.6.orig/include/linux/fs.h
|
|
|
|
+++ linux-2.6/include/linux/fs.h
|
2007-02-01 05:28:52 +00:00
|
|
|
@@ -983,7 +983,7 @@ extern int vfs_mkdir(struct inode *, str
|
2007-01-17 07:12:32 +00:00
|
|
|
extern int vfs_mknod(struct inode *, struct dentry *, struct vfsmount *, int, dev_t);
|
|
|
|
extern int vfs_symlink(struct inode *, struct dentry *, struct vfsmount *, const char *, int);
|
|
|
|
extern int vfs_link(struct dentry *, struct vfsmount *, struct inode *, struct dentry *, struct vfsmount *);
|
2007-01-10 06:33:09 +00:00
|
|
|
-extern int vfs_rmdir(struct inode *, struct dentry *);
|
2007-01-17 07:12:32 +00:00
|
|
|
+extern int vfs_rmdir(struct inode *, struct dentry *, struct vfsmount *);
|
2007-01-10 06:33:09 +00:00
|
|
|
extern int vfs_unlink(struct inode *, struct dentry *);
|
|
|
|
extern int vfs_rename(struct inode *, struct dentry *, struct inode *, struct dentry *);
|
|
|
|
|