diff options
author | Maxim Patlasov <MPatlasov@parallels.com> | 2014-04-28 08:19:21 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@suse.cz> | 2014-04-28 08:19:21 -0400 |
commit | d31433c8b06d44e27f7637574137dc4b5e6fd1d1 (patch) | |
tree | 9f792e395a57bdec407c87df9bbd6da0de9b5c4e /fs | |
parent | aeb4eb6b55261f44d3705f0a3b9e4906bfa5e416 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/fuse/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fuse/inode.c b/fs/fuse/inode.c index 8d611696fcad..299e553fcdfd 100644 --- a/fs/fuse/inode.c +++ b/fs/fuse/inode.c | |||
@@ -303,7 +303,7 @@ struct inode *fuse_iget(struct super_block *sb, u64 nodeid, | |||
303 | 303 | ||
304 | if ((inode->i_state & I_NEW)) { | 304 | if ((inode->i_state & I_NEW)) { |
305 | inode->i_flags |= S_NOATIME; | 305 | inode->i_flags |= S_NOATIME; |
306 | if (!fc->writeback_cache || !S_ISREG(inode->i_mode)) | 306 | if (!fc->writeback_cache || !S_ISREG(attr->mode)) |
307 | inode->i_flags |= S_NOCMTIME; | 307 | inode->i_flags |= S_NOCMTIME; |
308 | inode->i_generation = generation; | 308 | inode->i_generation = generation; |
309 | inode->i_data.backing_dev_info = &fc->bdi; | 309 | inode->i_data.backing_dev_info = &fc->bdi; |