Explorar el Código

NFSv4: Don't attempt an atomic open if the file is a mountpoint

Fix https://bugzilla.kernel.org/show_bug.cgi?id=15789

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Trond Myklebust hace 15 años
padre
commit
1f063d2cdf
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      fs/nfs/dir.c

+ 1 - 1
fs/nfs/dir.c

@@ -1050,7 +1050,7 @@ static int nfs_open_revalidate(struct dentry *dentry, struct nameidata *nd)
 	struct inode *dir;
 	struct inode *dir;
 	int openflags, ret = 0;
 	int openflags, ret = 0;
 
 
-	if (!is_atomic_open(nd))
+	if (!is_atomic_open(nd) || d_mountpoint(dentry))
 		goto no_open;
 		goto no_open;
 	parent = dget_parent(dentry);
 	parent = dget_parent(dentry);
 	dir = parent->d_inode;
 	dir = parent->d_inode;