Skip to content

Commit ed2b917

Browse files
author
Steve French
committed
[CIFS] Do not log path names in lookup errors
Andi Kleen noticed that we were logging access denied errors (which is noisy in the dmesg log, and not needed to be logged) and that we were logging path names on that an other errors (e.g. EIO) which we should not be doing. CC: Andi Kleen <ak@suse.de> Signed-off-by: Steve French <sfrench@us.ibm.com>
1 parent e6ab158 commit ed2b917

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

‎fs/cifs/dir.c‎

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -517,12 +517,10 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
517517
d_add(direntry, NULL);
518518
/* if it was once a directory (but how can we tell?) we could do
519519
shrink_dcache_parent(direntry); */
520-
} else {
521-
cERROR(1, ("Error 0x%x on cifs_get_inode_info in lookup of %s",
522-
rc, full_path));
523-
/* BB special case check for Access Denied - watch security
524-
exposure of returning dir info implicitly via different rc
525-
if file exists or not but no access BB */
520+
} else if (rc != -EACCES) {
521+
cERROR(1, ("Unexpected lookup error %d", rc));
522+
/* We special case check for Access Denied - since that
523+
is a common return code */
526524
}
527525

528526
kfree(full_path);

0 commit comments

Comments
 (0)