• Miklos Szeredi's avatar
    fuse: fix readdirplus Oops in fuse_dentry_revalidate · 28420dad
    Miklos Szeredi authored
    Fix bug introduced by commit 4582a4ab
    
     "FUSE: Adapt readdirplus to application
    usage patterns".
    
    We need to check for a positive dentry; negative dentries are not added by
    readdirplus.  Secondly we need to advise the use of readdirplus on the *parent*,
    otherwise the whole thing is useless.  Thirdly all this is only relevant if
    "readdirplus_auto" mode is selected by the filesystem.
    
    We advise the use of readdirplus only if the dentry was still valid.  If we had
    to redo the lookup then there was no use in doing the -plus version.
    Reported-by: default avatarBernd Schubert <bernd.schubert@itwm.fraunhofer.de>
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    CC: Feng Shuo <steve.shuo.feng@gmail.com>
    CC: stable@vger.kernel.org
    28420dad