diff mbox series

ceph: tone down loglevel on ceph_mdsc_build_path warning

Message ID 20191113200348.141572-1-jlayton@kernel.org (mailing list archive)
State New, archived
Headers show
Series ceph: tone down loglevel on ceph_mdsc_build_path warning | expand

Commit Message

Jeffrey Layton Nov. 13, 2019, 8:03 p.m. UTC
When this occurs, it usually means that we raced with a rename. Only
printk if we really did end up with pos < 0.

Either way, this is not a critical problem and doesn't warrant a
KERN_ERR warning. Change it to KERN_WARNING.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
 fs/ceph/mds_client.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 54a4e480c16b..e6a5a07a65e5 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -2184,8 +2184,10 @@  char *ceph_mdsc_build_path(struct dentry *dentry, int *plen, u64 *pbase,
 	base = ceph_ino(d_inode(temp));
 	rcu_read_unlock();
 	if (pos < 0 || read_seqretry(&rename_lock, seq)) {
-		pr_err("build_path did not end path lookup where "
-		       "expected, pos is %d\n", pos);
+		if (pos < 0)
+			pr_warn("build_path did not end path lookup where "
+				"expected, pos is %d\n", pos);
+
 		/* presumably this is only possible if racing with a
 		   rename of one of the parent directories (we can not
 		   lock the dentries above us to prevent this, but