SM501: Fix sm501_init_reg() mask/set order
[sfrench/cifs-2.6.git] / fs / file_table.c
index bc35a40417d7ada53223f5c93ed26875af97a646..d17fd691b8325c8dab7c4ab086bfb1900687b1e0 100644 (file)
@@ -10,7 +10,6 @@
 #include <linux/file.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/smp_lock.h>
 #include <linux/fs.h>
 #include <linux/security.h>
 #include <linux/eventpoll.h>
@@ -152,8 +151,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();
@@ -174,9 +173,10 @@ void fastcall __fput(struct file *file)
        fops_put(file->f_op);
        if (file->f_mode & FMODE_WRITE)
                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);
@@ -270,7 +270,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)