fuse: do not use uninitialized i_mode
When inode is in I_NEW state, inode->i_mode is not initialized yet. Do not use it before fuse_init_inode() is called. Signed-off-by: Maxim Patlasov <MPatlasov@parallels.com> Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
parent
aeb4eb6b55
commit
d31433c8b0
1 changed files with 1 additions and 1 deletions
|
@ -303,7 +303,7 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid,
|
|||
|
||||
if ((inode->i_state & I_NEW)) {
|
||||
inode->i_flags |= S_NOATIME;
|
||||
if (!fc->writeback_cache || !S_ISREG(inode->i_mode))
|
||||
if (!fc->writeback_cache || !S_ISREG(attr->mode))
|
||||
inode->i_flags |= S_NOCMTIME;
|
||||
inode->i_generation = generation;
|
||||
inode->i_data.backing_dev_info = &fc->bdi;
|
||||
|
|
Loading…
Add table
Reference in a new issue