From: Marko O. <d0...@us...> - 2010-01-18 16:28:11
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "kdfs". The branch, make_kdfs_compile has been updated via 58e1c712a0b4ba0ba4fde785cf79209fd7f40e09 (commit) from 4e903f43d02fdd14ab8eaa970daa15cb70fe4510 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 58e1c712a0b4ba0ba4fde785cf79209fd7f40e09 Author: Marko Obrovac <mar...@in...> Date: Mon Jan 18 16:27:10 2010 +0000 Remove __change_to_physical_root and __change_to_saved_root functions as they are not needed. Moreover, they cause the dentry count problem. diff --git a/fs/kdfs/physical_fs.c b/fs/kdfs/physical_fs.c index c299877..2c9637b 100644 --- a/fs/kdfs/physical_fs.c +++ b/fs/kdfs/physical_fs.c @@ -24,25 +24,6 @@ #define KDFS_PART "KDFS - Native File System Accesses" -void __change_to_physical_root(struct path *saved_root) -{ - write_lock(¤t->fs->lock); - *saved_root = current->fs->root; - current->fs->root = init_task.fs->root; - write_unlock(¤t->fs->lock); -} - -void __change_to_saved_root(const struct path *saved_root) -{ - struct path root; - - write_lock(¤t->fs->lock); - root = current->fs->root; - current->fs->root = *saved_root; - write_unlock(¤t->fs->lock); - path_put(&root); -} - int __change_creds(struct cred **overridden, const struct cred **old, uid_t fsuid, gid_t fsgid) { @@ -84,7 +65,6 @@ long create_phys_dir(const char *pathname, int error = 0; struct dentry *dentry; struct nameidata nd; - struct path saved_path; const struct cred *old_creds; struct cred *overridden_creds; @@ -94,8 +74,6 @@ long create_phys_dir(const char *pathname, if (error) goto out; - __change_to_physical_root(&saved_path); - error = path_lookup(pathname, LOOKUP_PARENT, &nd); if (error) goto out; @@ -124,7 +102,6 @@ long create_phys_dir(const char *pathname, path_put(&nd.path); out: - __change_to_saved_root(&saved_path); __revert_old_creds(overridden_creds, old_creds); return error; @@ -148,7 +125,6 @@ long remove_phys_dir(const char *pathname, uid_t uid, gid_t gid) struct dentry *dentry; struct inode *dir; long res = 0; - struct path saved_path; const struct cred *old_creds; struct cred *overridden_creds; @@ -158,8 +134,6 @@ long remove_phys_dir(const char *pathname, uid_t uid, gid_t gid) if (res) goto out; - __change_to_physical_root(&saved_path); - file = filp_open(pathname, O_LARGEFILE|O_RDONLY, 0644); if (IS_ERR(file) && PTR_ERR(file) == -ENOENT) { DEBUG(DBG_INFO, "Can't access to phys_dir %s\n", pathname); @@ -184,7 +158,6 @@ long remove_phys_dir(const char *pathname, uid_t uid, gid_t gid) filp_close(file,current->files); out: - __change_to_saved_root(&saved_path); __revert_old_creds(overridden_creds, old_creds); return res; @@ -209,7 +182,6 @@ struct file *open_phys_file(char *filename, int flags, int mode, uid_t uid, gid_ { int error = 0; struct file *file = NULL; - struct path saved_path; const struct cred *old_creds; struct cred *overridden_creds; @@ -217,8 +189,6 @@ struct file *open_phys_file(char *filename, int flags, int mode, uid_t uid, gid_ if (error) goto out; - __change_to_physical_root(&saved_path); - DEBUG(DBG_INFO, "Open physical file %s with flags 0x%08x - mode %o\n", filename, flags, mode); @@ -230,7 +200,6 @@ struct file *open_phys_file(char *filename, int flags, int mode, uid_t uid, gid_ DEBUG(DBG_INFO, "Open physical file %s done : %p\n", filename, file); out: - __change_to_saved_root(&saved_path); __revert_old_creds(overridden_creds, old_creds); if (error) @@ -411,7 +380,6 @@ int remove_phys_file(const char *filename, uid_t uid, gid_t gid) struct dentry *dentry; struct inode *dir; int res = 0; - struct path saved_path; const struct cred *old_creds; struct cred *overridden_creds; @@ -421,8 +389,6 @@ int remove_phys_file(const char *filename, uid_t uid, gid_t gid) if (res) goto out; - __change_to_physical_root(&saved_path); - file = filp_open(filename, O_LARGEFILE|O_RDONLY, 0644); if (IS_ERR(file) && PTR_ERR(file) == -ENOENT) { @@ -448,7 +414,6 @@ int remove_phys_file(const char *filename, uid_t uid, gid_t gid) DEBUG(DBG_INFO, "After vfs_unlink res = %d\n", res); out: - __change_to_saved_root(&saved_path); __revert_old_creds(overridden_creds, old_creds); return res; ----------------------------------------------------------------------- Summary of changes: fs/kdfs/physical_fs.c | 35 ----------------------------------- 1 files changed, 0 insertions(+), 35 deletions(-) hooks/post-receive -- kdfs |