diff mbox

[linux-cifs-client,8/8] cifs: clean up d_revalidate error return

Message ID 1265918330-2810-9-git-send-email-jlayton@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton Feb. 11, 2010, 7:58 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c
index e9f7ecc..6909b60 100644
--- a/fs/cifs/dir.c
+++ b/fs/cifs/dir.c
@@ -736,11 +736,15 @@  cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
 static int
 cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
 {
+	int rc;
 	int isValid = 1;
 
 	if (direntry->d_inode) {
-		if (cifs_revalidate_dentry(direntry))
-			return 0;
+		rc = cifs_revalidate_dentry(direntry);
+		if (rc == -ENOENT)
+			isValid = 0;
+		else if (rc)
+			isValid = rc;
 	} else {
 		cFYI(1, ("neg dentry 0x%p name = %s",
 			 direntry, direntry->d_name.name));