From patchwork Fri Jan 4 11:45:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: ycnian@gmail.com X-Patchwork-Id: 1932761 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id CDA0A3FF0F for ; Fri, 4 Jan 2013 11:55:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751269Ab3ADLzU (ORCPT ); Fri, 4 Jan 2013 06:55:20 -0500 Received: from mail-pb0-f47.google.com ([209.85.160.47]:46784 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750797Ab3ADLzT (ORCPT ); Fri, 4 Jan 2013 06:55:19 -0500 Received: by mail-pb0-f47.google.com with SMTP id un1so9111515pbc.20 for ; Fri, 04 Jan 2013 03:55:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=9wVyf+SzvdYqdjbug4DsHSTeGhuzMBQjc/9s8KUe1QA=; b=BURvP3kyPfXmT5U30aOeiW5GuPf5uA2m+gJTNL4Hj2CT8Na2WK/+fk9+IsGTXrhXXe MyLWGd48qPX6KlPV6smyunOWtZBVik7kFmyvu1qD8ovpXk84EWGRDpxMUT7QbUxooy9k GO86u0ttap4LwcrankSeckEPeZXj6StUk7pxl6P2lKQrFcF6V3aYRhxcBK4t3RBT1RNK 3c2fNMaHvYSGiCx6r5HYdmU3KxHkndLQiNW3pJ/O8M/wfJ/FCgkQksM9A11j1SczLq4o xrdk6vbWIi7R1cvVxrwss52nsf8Mu4s+1+q2rb3O91ArbpRub2xZTjMo71o44//zhexT v+/A== X-Received: by 10.68.219.67 with SMTP id pm3mr162977784pbc.150.1357300518162; Fri, 04 Jan 2013 03:55:18 -0800 (PST) Received: from localhost ([159.226.5.131]) by mx.google.com with ESMTPS id na7sm32133645pbc.48.2013.01.04.03.55.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 04 Jan 2013 03:55:17 -0800 (PST) From: ycnian@gmail.com To: bfields@fieldses.org Cc: linux-kernel@vger.kernel.org, linux-nfs@vger.kernel.org, Yanchuan Nian Subject: [PATCH] nfsd: Remove write permission from file content Date: Fri, 4 Jan 2013 19:45:35 +0800 Message-Id: <1357299935-9321-1-git-send-email-ycnian@gmail.com> X-Mailer: git-send-email 1.7.4.4 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Yanchuan Nian The write function doesn't be implemented in file content, and it's meaningless to write data into this file directly. Remove write permission from it. Signed-off-by: Yanchuan Nian --- net/sunrpc/cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c index 9afa439..9f84703 100644 --- a/net/sunrpc/cache.c +++ b/net/sunrpc/cache.c @@ -1614,7 +1614,7 @@ static int create_cache_proc_entries(struct cache_detail *cd, struct net *net) goto out_nomem; } if (cd->cache_show) { - p = proc_create_data("content", S_IFREG|S_IRUSR|S_IWUSR, + p = proc_create_data("content", S_IFREG|S_IRUSR, cd->u.procfs.proc_ent, &content_file_operations_procfs, cd); cd->u.procfs.content_ent = p;