Return-Path: Received: from mail-pf0-f194.google.com ([209.85.192.194]:34799 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751077AbdFDBFH (ORCPT ); Sat, 3 Jun 2017 21:05:07 -0400 Received: by mail-pf0-f194.google.com with SMTP id w69so16668382pfk.1 for ; Sat, 03 Jun 2017 18:05:06 -0700 (PDT) From: Myungho Jung To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org Subject: [PATCH] fs: Added a missing flag to print warning message in d_set_d_op Date: Sat, 3 Jun 2017 18:05:02 -0700 Message-Id: <1496538302-24180-1-git-send-email-mhjungk@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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 --- fs/dcache.c | 1 + 1 file changed, 1 insertion(+) 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) -- 2.7.4