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)
committerChuck Lever <cel@kernel.org>
Sat, 10 Dec 2022 16:01:11 +0000 (11:01 -0500)
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 284b019cb6529b999c9a2dbdd21f06f7c0325c38..b72023a6b4c16d9fbdb4d9c0021d93e732bbc99b 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 e35c05e2780618bcf62504b79f41f8f12a4f292b..32784f508c8106313a4b1e7728b56e22bcd857b7 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;