From patchwork Tue Jul 16 13:16:45 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 2828126 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2A28FC0AB2 for ; Tue, 16 Jul 2013 13:17:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 80585201EA for ; Tue, 16 Jul 2013 13:17:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B7B1D201EB for ; Tue, 16 Jul 2013 13:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932356Ab3GPNQy (ORCPT ); Tue, 16 Jul 2013 09:16:54 -0400 Received: from mail-gg0-f174.google.com ([209.85.161.174]:55296 "EHLO mail-gg0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754271Ab3GPNQx (ORCPT ); Tue, 16 Jul 2013 09:16:53 -0400 Received: by mail-gg0-f174.google.com with SMTP id y3so167986ggc.33 for ; Tue, 16 Jul 2013 06:16:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=2JxeZjyLcIQBU+CFeFmQBnYAmHkLgu5R2f/JRzqHBFg=; b=SapEeBctHWAFDdyp314ZGayyuO55n5tKCFIbMoK4eI1gLCwIz/LrON1M1aBZ5MwxBn D6xOW1tMM7YK/ZhOTAnx7CCPcpbVYl45sS0WTvlQxB5OI37tYC9yIk/4/6Zb2R4SGdOc wYccddKQQlVKmTWKA9qxXDpZKAMfG4OTEODxDNl9m6Lx3qpxfIj3GlO+i3PtjnsYj5ph rJrGtWMnYO+HYJfGudqNvI78Jmpkg1S67AX2rqOpU1FbrelHUFrPR8UtdFBpDLCSkkrX 702MiJUlw3NRI0GIpr9FJ3tjjtPkCx5Mpshw9kzUPU97oNM3AgSAYhVSRD3irVCdf4ux oxRA== X-Received: by 10.236.88.65 with SMTP id z41mr400498yhe.5.1373980611399; Tue, 16 Jul 2013 06:16:51 -0700 (PDT) Received: from salusa.poochiereds.net (cpe-107-015-124-230.nc.res.rr.com. [107.15.124.230]) by mx.google.com with ESMTPSA id b50sm1201801yhl.1.2013.07.16.06.16.50 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 16 Jul 2013 06:16:50 -0700 (PDT) From: Jeff Layton To: Trond Myklebust Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, Al Viro Subject: [PATCH] rpc_pipe: convert back to simple_dir_inode_operations Date: Tue, 16 Jul 2013 09:16:45 -0400 Message-Id: <1373980605-31852-1-git-send-email-jlayton@redhat.com> X-Mailer: git-send-email 1.8.3.1 X-Gm-Message-State: ALoCoQmxU7dyhsJkRvL6ue6w/52+Zpf9jSpE7IlWSEop4HCUArWPcqqdv8j1BelcDl9H8LkYA0TD Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that Al has fixed simple_lookup to account for the case where sb->s_d_op is set, there's no need to keep our own special lookup op. Signed-off-by: Jeff Layton --- net/sunrpc/rpc_pipe.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c index 406859c..017aedc 100644 --- a/net/sunrpc/rpc_pipe.c +++ b/net/sunrpc/rpc_pipe.c @@ -480,23 +480,6 @@ static const struct dentry_operations rpc_dentry_operations = { .d_delete = rpc_delete_dentry, }; -/* - * Lookup the data. This is trivial - if the dentry didn't already - * exist, we know it is negative. - */ -static struct dentry * -rpc_lookup(struct inode *dir, struct dentry *dentry, unsigned int flags) -{ - if (dentry->d_name.len > NAME_MAX) - return ERR_PTR(-ENAMETOOLONG); - d_add(dentry, NULL); - return NULL; -} - -static const struct inode_operations rpc_dir_inode_operations = { - .lookup = rpc_lookup, -}; - static struct inode * rpc_get_inode(struct super_block *sb, umode_t mode) { @@ -509,7 +492,7 @@ rpc_get_inode(struct super_block *sb, umode_t mode) switch (mode & S_IFMT) { case S_IFDIR: inode->i_fop = &simple_dir_operations; - inode->i_op = &rpc_dir_inode_operations; + inode->i_op = &simple_dir_inode_operations; inc_nlink(inode); default: break;