瀏覽代碼

ceph: fix d_revalidate oopsen on NFS exports

can't blindly check nd->flags in ->d_revalidate()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 14 年之前
父節點
當前提交
0eb980e317
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ceph/dir.c

+ 1 - 1
fs/ceph/dir.c

@@ -993,7 +993,7 @@ static int ceph_d_revalidate(struct dentry *dentry, struct nameidata *nd)
 {
 {
 	struct inode *dir;
 	struct inode *dir;
 
 
-	if (nd->flags & LOOKUP_RCU)
+	if (nd && nd->flags & LOOKUP_RCU)
 		return -ECHILD;
 		return -ECHILD;
 
 
 	dir = dentry->d_parent->d_inode;
 	dir = dentry->d_parent->d_inode;