From: Tony Jones Subject: [RFC 2/28] Remove redundant check from proc_setattr(). Date: Mon, 05 Feb 2007 10:22:34 -0800 Message-ID: <20070205182234.12164.15765.sendpatchset@ermintrude.int.wirex.com> References: <20070205182213.12164.40927.sendpatchset@ermintrude.int.wirex.com> Cc: linux-fsdevel@vger.kernel.org, chrisw@sous-sol.org, Tony Jones , linux-security-module@vger.kernel.org, agruen@suse.de To: linux-kernel@vger.kernel.org Return-path: In-Reply-To: <20070205182213.12164.40927.sendpatchset@ermintrude.int.wirex.com> Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Remove redundant check from proc_setattr() notify_change() already calls security_inode_setattr() before calling iop->setattr. Signed-off-by: Tony Jones Signed-off-by: Andreas Gruenbacher Index: linux-2.6/fs/proc/base.c =================================================================== --- linux-2.6.orig/fs/proc/base.c +++ linux-2.6/fs/proc/base.c @@ -344,11 +344,8 @@ static int proc_setattr(struct dentry *d return -EPERM; error = inode_change_ok(inode, attr); - if (!error) { - error = security_inode_setattr(dentry, attr); - if (!error) - error = inode_setattr(inode, attr); - } + if (!error) + error = inode_setattr(inode, attr); return error; }