summaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorMaxim Patlasov <MPatlasov@parallels.com>2014-04-28 14:19:21 +0200
committerMiklos Szeredi <mszeredi@suse.cz>2014-04-28 14:19:21 +0200
commitd31433c8b06d44e27f7637574137dc4b5e6fd1d1 (patch)
tree9f792e395a57bdec407c87df9bbd6da0de9b5c4e /fs/fuse
parentfuse: fix mtime update error in fsync (diff)
downloadlinux-d31433c8b06d44e27f7637574137dc4b5e6fd1d1.tar.xz
linux-d31433c8b06d44e27f7637574137dc4b5e6fd1d1.zip
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/fuse')
-rw-r--r--fs/fuse/inode.c2
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,
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;