|
@@ -36,6 +36,7 @@
|
|
|
#include <linux/bit_spinlock.h>
|
|
|
#include <linux/rculist_bl.h>
|
|
|
#include <linux/prefetch.h>
|
|
|
+#include <linux/ratelimit.h>
|
|
|
#include "internal.h"
|
|
|
|
|
|
/*
|
|
@@ -2383,8 +2384,16 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
|
|
|
actual = __d_unalias(inode, dentry, alias);
|
|
|
}
|
|
|
write_sequnlock(&rename_lock);
|
|
|
- if (IS_ERR(actual))
|
|
|
+ if (IS_ERR(actual)) {
|
|
|
+ if (PTR_ERR(actual) == -ELOOP)
|
|
|
+ pr_warn_ratelimited(
|
|
|
+ "VFS: Lookup of '%s' in %s %s"
|
|
|
+ " would have caused loop\n",
|
|
|
+ dentry->d_name.name,
|
|
|
+ inode->i_sb->s_type->name,
|
|
|
+ inode->i_sb->s_id);
|
|
|
dput(alias);
|
|
|
+ }
|
|
|
goto out_nolock;
|
|
|
}
|
|
|
}
|