aboutsummaryrefslogtreecommitdiffstats
path: root/fs/file_table.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/file_table.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/file_table.c')
-rw-r--r--fs/file_table.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/file_table.c b/fs/file_table.c
index 24f25a057d9c..4c17a18d8c10 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -152,8 +152,8 @@ EXPORT_SYMBOL(fput);
152 */ 152 */
153void fastcall __fput(struct file *file) 153void fastcall __fput(struct file *file)
154{ 154{
155 struct dentry *dentry = file->f_dentry; 155 struct dentry *dentry = file->f_path.dentry;
156 struct vfsmount *mnt = file->f_vfsmnt; 156 struct vfsmount *mnt = file->f_path.mnt;
157 struct inode *inode = dentry->d_inode; 157 struct inode *inode = dentry->d_inode;
158 158
159 might_sleep(); 159 might_sleep();
@@ -176,8 +176,8 @@ void fastcall __fput(struct file *file)
176 put_write_access(inode); 176 put_write_access(inode);
177 put_pid(file->f_owner.pid); 177 put_pid(file->f_owner.pid);
178 file_kill(file); 178 file_kill(file);
179 file->f_dentry = NULL; 179 file->f_path.dentry = NULL;
180 file->f_vfsmnt = NULL; 180 file->f_path.mnt = NULL;
181 file_free(file); 181 file_free(file);
182 dput(dentry); 182 dput(dentry);
183 mntput(mnt); 183 mntput(mnt);
@@ -271,7 +271,7 @@ int fs_may_remount_ro(struct super_block *sb)
271 file_list_lock(); 271 file_list_lock();
272 list_for_each(p, &sb->s_files) { 272 list_for_each(p, &sb->s_files) {
273 struct file *file = list_entry(p, struct file, f_u.fu_list); 273 struct file *file = list_entry(p, struct file, f_u.fu_list);
274 struct inode *inode = file->f_dentry->d_inode; 274 struct inode *inode = file->f_path.dentry->d_inode;
275 275
276 /* File with pending delete? */ 276 /* File with pending delete? */
277 if (inode->i_nlink == 0) 277 if (inode->i_nlink == 0)