virtiofsd: extract lo_do_open() from lo_open()
authorStefan Hajnoczi <stefanha@redhat.com>
Thu, 4 Feb 2021 15:02:06 +0000 (15:02 +0000)
committerSoonKyu Park <sk7.park@samsung.com>
Tue, 23 Nov 2021 04:45:30 +0000 (13:45 +0900)
commit2c18eff386c21f3b7879d7d5963baf43acf325aa
tree597d4b635857ce3ba0100d2ac2ff3b552cdf4611
parentbeedf657b835950a2f45ea56fb7d2903b2c68880
virtiofsd: extract lo_do_open() from lo_open()

Git-commit: 8afaaee976965b7fb90ec225a51d60f35c5f173c
References: bsc#1183373, CVE-2021-20263

Both lo_open() and lo_create() have similar code to open a file. Extract
a common lo_do_open() function from lo_open() that will be used by
lo_create() in a later commit.

Since lo_do_open() does not otherwise need fuse_req_t req, convert
lo_add_fd_mapping() to use struct lo_data *lo instead.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20210204150208.367837-2-stefanha@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
tools/virtiofsd/passthrough_ll.c