From patchwork Fri Nov 11 19:36:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Layton X-Patchwork-Id: 13040762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D7B60C43217 for ; Fri, 11 Nov 2022 19:36:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230105AbiKKTgo (ORCPT ); Fri, 11 Nov 2022 14:36:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233965AbiKKTgn (ORCPT ); Fri, 11 Nov 2022 14:36:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0034A787B8 for ; Fri, 11 Nov 2022 11:36:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 8F3C0620C3 for ; Fri, 11 Nov 2022 19:36:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96ABFC433D6; Fri, 11 Nov 2022 19:36:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1668195402; bh=iPU2ya7vrzgXAOb87/v2umBwtkGSZt9BZbUd7t73RfQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=paBcyv9PTBQaCumnFg5+dRWJJAmXL1FVcxBhNu4xwBhgW5nQPcq0B0J5ku/2tRbyB eFMSfzBnJFeY5QEN/GrHFSkVZH09lEW1Qij2yVeIpvJ44Pn7uBFcNa5I8nLIgSCJSg ktwZYvV/dZsGgWhn6hDNNTXZP4YdkXATliVSHnu4iihFhVo9AjC/C4ICnZ+8BraoV5 RZk/Fi4qRd+Jtv7cpluz7/u2msZSP2Wgm+QZubxQPPDG1vxoOJZrEYp2xsPaAheQ5V dHLEov/TBzKVu/kILcOuQRlBDbkktk0mSuRGaUxXz+qhWxuzcKmZUVlkltnwhq2kWu BCgrvhWH0BByw== From: Jeff Layton To: chuck.lever@oracle.com Cc: trond.myklebust@hammerspace.com, linux-nfs@vger.kernel.org Subject: [PATCH 1/4] lockd: set missing fl_flags field when retrieving args Date: Fri, 11 Nov 2022 14:36:36 -0500 Message-Id: <20221111193639.346992-2-jlayton@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221111193639.346992-1-jlayton@kernel.org> References: <20221111193639.346992-1-jlayton@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Signed-off-by: Jeff Layton --- fs/lockd/svc4proc.c | 1 + fs/lockd/svcproc.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c index 284b019cb652..b72023a6b4c1 100644 --- a/fs/lockd/svc4proc.c +++ b/fs/lockd/svc4proc.c @@ -52,6 +52,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, *filp = file; /* Set up the missing parts of the file_lock structure */ + lock->fl.fl_flags = FL_POSIX; lock->fl.fl_file = file->f_file[mode]; lock->fl.fl_pid = current->tgid; lock->fl.fl_start = (loff_t)lock->lock_start; diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c index e35c05e27806..32784f508c81 100644 --- a/fs/lockd/svcproc.c +++ b/fs/lockd/svcproc.c @@ -77,6 +77,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp, /* Set up the missing parts of the file_lock structure */ mode = lock_to_openmode(&lock->fl); + lock->fl.fl_flags = FL_POSIX; lock->fl.fl_file = file->f_file[mode]; lock->fl.fl_pid = current->tgid; lock->fl.fl_lmops = &nlmsvc_lock_operations;