]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
lockd: set missing fl_flags field when retrieving args
authorJeff Layton <jlayton@kernel.org>
Fri, 11 Nov 2022 19:36:36 +0000 (14:36 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:24 +0000 (16:19 +0200)
[ Upstream commit 75c7940d2a86d3f1b60a0a265478cb8fc887b970 ]

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/lockd/svc4proc.c
fs/lockd/svcproc.c

index 742b8d31d2fad0691d95b4f14340ceed065ed7ad..e318d55e4c0ef92f67f02b67d52fbc5ff7d03a47 100644 (file)
@@ -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;
index 7e25d5583c7d0ca81a3eab8cea1d05bc03882fee..2a615032f5d0f9493d62ef130c078c670973f063 100644 (file)
@@ -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;