From: Maxim Patlasov Date: Mon, 28 Apr 2014 12:19:21 +0000 (+0200) Subject: fuse: do not use uninitialized i_mode X-Git-Tag: MMI-PSA29.97-13-9~12246^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d31433c8b06d44e27f7637574137dc4b5e6fd1d1;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git 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 Signed-off-by: Miklos Szeredi --- 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, 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;