projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qlcnic: Support atomic commands
[firefly-linux-kernel-4.4.55.git]
/
fs
/
file_table.c
diff --git
a/fs/file_table.c
b/fs/file_table.c
index aa07d3684a2e8e13bdf4ae36eb5dc0ba98641223..cd4d87a82951f6169cd4f5fd8e24a61c45c16b8d 100644
(file)
--- a/
fs/file_table.c
+++ b/
fs/file_table.c
@@
-176,6
+176,7
@@
struct file *alloc_file(struct path *path, fmode_t mode,
return file;
file->f_path = *path;
return file;
file->f_path = *path;
+ file->f_inode = path->dentry->d_inode;
file->f_mapping = path->dentry->d_inode->i_mapping;
file->f_mode = mode;
file->f_op = fop;
file->f_mapping = path->dentry->d_inode->i_mapping;
file->f_mode = mode;
file->f_op = fop;
@@
-258,6
+259,7
@@
static void __fput(struct file *file)
drop_file_write_access(file);
file->f_path.dentry = NULL;
file->f_path.mnt = NULL;
drop_file_write_access(file);
file->f_path.dentry = NULL;
file->f_path.mnt = NULL;
+ file->f_inode = NULL;
file_free(file);
dput(dentry);
mntput(mnt);
file_free(file);
dput(dentry);
mntput(mnt);