diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 70d3e631266e..b658b6baf72f 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -480,6 +480,11 @@ static int fuse_dentry_init(struct dentry *dentry) fd->dentry = dentry; RB_CLEAR_NODE(&fd->node); dentry->d_fsdata = fd; + /* + * Initialising d_time (epoch) to '0' ensures the dentry is invalid + * if compared to fc->epoch, which is initialized to '1'. + */ + dentry->d_time = 0; return 0; }