From patchwork Sat May 6 15:36:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geliang Tang X-Patchwork-Id: 9714943 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BA9C360362 for ; Sat, 6 May 2017 15:36:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8CC712815E for ; Sat, 6 May 2017 15:36:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F86728630; Sat, 6 May 2017 15:36:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19DFA2815E for ; Sat, 6 May 2017 15:36:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751870AbdEFPgX (ORCPT ); Sat, 6 May 2017 11:36:23 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33228 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751804AbdEFPgW (ORCPT ); Sat, 6 May 2017 11:36:22 -0400 Received: by mail-pf0-f196.google.com with SMTP id b23so4335738pfc.0; Sat, 06 May 2017 08:36:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=CR6riunxfmLkZjJHM90c4zhJfSfbXRNzAj5jVHG+p4s=; b=ect3TRLBIDnfzEHPbzdsvbDWgyKHn0lRICjh8WznseQuNpLfY0xlbWiIIUxN+35ugy QQ70TXSXMgJgLWP/tLpcSpuBvRafUfeALlhaleB+pXrcGUxnd+UCWyCPG10dsaR1ehVA /nadcOlUzO/ogxafpTh+j6mPiBi6S6sPBtIr74lrDLGjx92bQV9+xXMqytEk8rOlXlQW JxN5FUDtEpBFUkvdF+TbIjl9a5H6wkXvFbMq4g0xahv7VPdu+gAKxzWIB2xxzo28ZZW+ V7VyY0Pvmy6OnbySISiWtT42U8cwrvIZVpmE16hzLpAg2zuVCU7D3P+B11Qwn4D06E3d vjiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=CR6riunxfmLkZjJHM90c4zhJfSfbXRNzAj5jVHG+p4s=; b=Igjxdu/al18z7lndxujqPTIDlPbONqeQFBDVelPFh41CrbRiHrwoEZc4PAOfRtGnJv 11F0SqpHpc2GnpEioBvEm8OyaXY2i/UYtB688xGS4rxUa6Mmo0gAYgizkmELQZk4msNs gS8l8HhS2d9S9W6wSTvNmKdfj1KjZH0TYKirTVdnpehPDBsSQpGKWBWM4/wrSHQNo39Y OHAgyUBJsi749OCwXVFERAuvKBbxrYirqciurrCsYgK3IbOf/OGukJRYZbejbLz6PpGQ dDjwkKiuJEUqNjf0vb8COK38IgMfVp6Sg2Kj9Dx/2ve9MJIHB08LYhezVyxiFX+Dz2Gu 4uzQ== X-Gm-Message-State: AN3rC/5rs7e5dDrKTpu/FUW3XYn+QZoHFNf1PSrK0XarTfvA+vx3TsER dsAPJ3uszJTQyw== X-Received: by 10.84.233.205 with SMTP id m13mr12066051pln.72.1494084982295; Sat, 06 May 2017 08:36:22 -0700 (PDT) Received: from localhost (li409-196.members.linode.com. [106.187.89.196]) by smtp.gmail.com with ESMTPSA id z5sm16509395pfd.76.2017.05.06.08.36.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 06 May 2017 08:36:21 -0700 (PDT) From: Geliang Tang To: Jeff Layton , "J. Bruce Fields" , Al Viro Cc: Geliang Tang , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fs: set no_llseek in DEFINE_SIMPLE_ATTRIBUTE Date: Sat, 6 May 2017 23:36:16 +0800 Message-Id: <8c4daf1769bb2e02e4b8e0027a10ad55d947b735.1493796421.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In DEFINE_SIMPLE_ATTRIBUTE() macro, since we use nonseekable_open() to open, we should use no_llseek() to seek, not generic_file_llseek(). Signed-off-by: Geliang Tang --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 9ea93c6..8762287 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -3117,7 +3117,7 @@ static const struct file_operations __fops = { \ .release = simple_attr_release, \ .read = simple_attr_read, \ .write = simple_attr_write, \ - .llseek = generic_file_llseek, \ + .llseek = no_llseek, \ } static inline __printf(1, 2)