Skip to contentSkip to conversation

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

PATCH New Myungho Jung 1 participant 1 message Jun 4, 2017 VFS

lore
Share & tools
lore
#0 lore raw

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

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.

---
 fs/dcache.c | 1 +
 1 file changed, 1 insertion(+)
fs/dcache.c +1 -0
index cddf397..057862a 100644
@@ -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)
Signature · 1 line
2.7.4