From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Hansen Subject: [PATCH 15/26] mount_is_safe(): add comment Date: Fri, 22 Jun 2007 13:03:22 -0700 Message-ID: <20070622200322.F1AC0AC0@kernel> References: <20070622200303.82D9CC3A@kernel> Cc: linux-fsdevel@vger.kernel.org, hch@infradead.org, viro@ftp.linux.org.uk, Dave Hansen To: akpm@osdl.org Return-path: Received: from e5.ny.us.ibm.com ([32.97.182.145]:48103 "EHLO e5.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbXFVUD0 (ORCPT ); Fri, 22 Jun 2007 16:03:26 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by e5.ny.us.ibm.com (8.13.8/8.13.8) with ESMTP id l5MK3Pbd003392 for ; Fri, 22 Jun 2007 16:03:25 -0400 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v8.3) with ESMTP id l5MK3Pim549652 for ; Fri, 22 Jun 2007 16:03:25 -0400 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id l5MK3Oa3016079 for ; Fri, 22 Jun 2007 16:03:25 -0400 In-Reply-To: <20070622200303.82D9CC3A@kernel> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org This area of code is currently #ifdef'd out, so add a comment for the time when it is actually used. Signed-off-by: Dave Hansen --- lxc-dave/fs/namespace.c | 4 ++++ 1 file changed, 4 insertions(+) diff -puN fs/namespace.c~11-24-mount-is-safe-add-comment fs/namespace.c --- lxc/fs/namespace.c~11-24-mount-is-safe-add-comment 2007-06-21 23:23:20.000000000 -0700 +++ lxc-dave/fs/namespace.c 2007-06-21 23:23:20.000000000 -0700 @@ -691,6 +691,10 @@ static int mount_is_safe(struct nameidat if (current->uid != nd->dentry->d_inode->i_uid) return -EPERM; } + /* + * We will eventually check for the mnt->writer_count here, + * but since the code is not used now, skip it - Dave Hansen + */ if (vfs_permission(nd, MAY_WRITE)) return -EPERM; return 0; _