[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>
This commit is contained in:

committed by
Linus Torvalds

parent
b65d34fd46
commit
0f7fc9e4d0
@@ -152,8 +152,8 @@ EXPORT_SYMBOL(fput);
|
||||
*/
|
||||
void fastcall __fput(struct file *file)
|
||||
{
|
||||
struct dentry *dentry = file->f_dentry;
|
||||
struct vfsmount *mnt = file->f_vfsmnt;
|
||||
struct dentry *dentry = file->f_path.dentry;
|
||||
struct vfsmount *mnt = file->f_path.mnt;
|
||||
struct inode *inode = dentry->d_inode;
|
||||
|
||||
might_sleep();
|
||||
@@ -176,8 +176,8 @@ void fastcall __fput(struct file *file)
|
||||
put_write_access(inode);
|
||||
put_pid(file->f_owner.pid);
|
||||
file_kill(file);
|
||||
file->f_dentry = NULL;
|
||||
file->f_vfsmnt = NULL;
|
||||
file->f_path.dentry = NULL;
|
||||
file->f_path.mnt = NULL;
|
||||
file_free(file);
|
||||
dput(dentry);
|
||||
mntput(mnt);
|
||||
@@ -271,7 +271,7 @@ int fs_may_remount_ro(struct super_block *sb)
|
||||
file_list_lock();
|
||||
list_for_each(p, &sb->s_files) {
|
||||
struct file *file = list_entry(p, struct file, f_u.fu_list);
|
||||
struct inode *inode = file->f_dentry->d_inode;
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
|
||||
/* File with pending delete? */
|
||||
if (inode->i_nlink == 0)
|
||||
|
Reference in New Issue
Block a user