diff mbox

fs: Added a missing flag to print warning message in d_set_d_op

Message ID 1496538302-24180-1-git-send-email-mhjungk@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Myungho Jung June 4, 2017, 1:05 a.m. UTC
DCACHE_OP_PRUNE is not checked before setting dentry cache operator.
This will show no warning even if operation pointers of a dentry with
only d_prune pointer are changed by calling d_set_d_op.

Signed-off-by: Myungho Jung <mhjungk@gmail.com>
---
 fs/dcache.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/fs/dcache.c b/fs/dcache.c
index cddf397..057862a 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1711,6 +1711,7 @@  void d_set_d_op(struct dentry *dentry, const struct dentry_operations *op)
 				DCACHE_OP_REVALIDATE	|
 				DCACHE_OP_WEAK_REVALIDATE	|
 				DCACHE_OP_DELETE	|
+				DCACHE_OP_PRUNE	|
 				DCACHE_OP_REAL));
 	dentry->d_op = op;
 	if (!op)