aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorJosef "Jeff" Sipek <jsipek@cs.sunysb.edu>2006-12-08 05:36:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2006-12-08 11:28:41 -0500
commit0f7fc9e4d03987fe29f6dd4aa67e4c56eb7ecb05 (patch)
tree51763269e44eb9bf4d0f8c529577489902850cf9 /fs/namei.c
parentb65d34fd465f19fbe2f32f2205a9a06ca7c2bdeb (diff)
[PATCH] VFS: change struct file to use struct path
This patch changes struct file to use struct path instead of having independent pointers to struct dentry and struct vfsmount, and converts all users of f_{dentry,vfsmnt} in fs/ to use f_path.{dentry,mnt}. Additionally, it adds two #define's to make the transition easier for users of the f_dentry and f_vfsmnt. Signed-off-by: Josef "Jeff" Sipek <jsipek@cs.sunysb.edu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 8c2db88bb20d..e4f108f08230 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -297,7 +297,7 @@ int vfs_permission(struct nameidata *nd, int mask)
297 */ 297 */
298int file_permission(struct file *file, int mask) 298int file_permission(struct file *file, int mask)
299{ 299{
300 return permission(file->f_dentry->d_inode, mask, NULL); 300 return permission(file->f_path.dentry->d_inode, mask, NULL);
301} 301}
302 302
303/* 303/*
@@ -333,7 +333,7 @@ int get_write_access(struct inode * inode)
333 333
334int deny_write_access(struct file * file) 334int deny_write_access(struct file * file)
335{ 335{
336 struct inode *inode = file->f_dentry->d_inode; 336 struct inode *inode = file->f_path.dentry->d_inode;
337 337
338 spin_lock(&inode->i_lock); 338 spin_lock(&inode->i_lock);
339 if (atomic_read(&inode->i_writecount) > 0) { 339 if (atomic_read(&inode->i_writecount) > 0) {
@@ -368,7 +368,7 @@ void path_release_on_umount(struct nameidata *nd)
368 */ 368 */
369void release_open_intent(struct nameidata *nd) 369void release_open_intent(struct nameidata *nd)
370{ 370{
371 if (nd->intent.open.file->f_dentry == NULL) 371 if (nd->intent.open.file->f_path.dentry == NULL)
372 put_filp(nd->intent.open.file); 372 put_filp(nd->intent.open.file);
373 else 373 else
374 fput(nd->intent.open.file); 374 fput(nd->intent.open.file);
@@ -1138,7 +1138,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
1138 if (!file) 1138 if (!file)
1139 goto out_fail; 1139 goto out_fail;
1140 1140
1141 dentry = file->f_dentry; 1141 dentry = file->f_path.dentry;
1142 1142
1143 retval = -ENOTDIR; 1143 retval = -ENOTDIR;
1144 if (!S_ISDIR(dentry->d_inode->i_mode)) 1144 if (!S_ISDIR(dentry->d_inode->i_mode))
@@ -1148,7 +1148,7 @@ static int fastcall do_path_lookup(int dfd, const char *name,
1148 if (retval) 1148 if (retval)
1149 goto fput_fail; 1149 goto fput_fail;
1150 1150
1151 nd->mnt = mntget(file->f_vfsmnt); 1151 nd->mnt = mntget(file->f_path.mnt);
1152 nd->dentry = dget(dentry); 1152 nd->dentry = dget(dentry);
1153 1153
1154 fput_light(file, fput_needed); 1154 fput_light(file, fput_needed);