mirror of
https://github.com/NVIDIA/open-gpu-kernel-modules.git
synced 2026-03-02 03:39:50 +00:00
545.23.06
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019-2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-FileCopyrightText: Copyright (c) 2019-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
@@ -490,6 +490,7 @@ static struct file_operations g_nv_cap_drv_fops;
|
||||
|
||||
int NV_API_CALL nv_cap_validate_and_dup_fd(const nv_cap_t *cap, int fd)
|
||||
{
|
||||
#if NV_FILESYSTEM_ACCESS_AVAILABLE
|
||||
struct file *file;
|
||||
int dup_fd;
|
||||
struct inode *inode = NULL;
|
||||
@@ -558,10 +559,14 @@ int NV_API_CALL nv_cap_validate_and_dup_fd(const nv_cap_t *cap, int fd)
|
||||
err:
|
||||
fput(file);
|
||||
return -1;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
}
|
||||
|
||||
void NV_API_CALL nv_cap_close_fd(int fd)
|
||||
{
|
||||
#if NV_FILESYSTEM_ACCESS_AVAILABLE
|
||||
if (fd == -1)
|
||||
{
|
||||
return;
|
||||
@@ -599,6 +604,7 @@ void NV_API_CALL nv_cap_close_fd(int fd)
|
||||
#endif
|
||||
|
||||
task_unlock(current);
|
||||
#endif
|
||||
}
|
||||
|
||||
static nv_cap_t* nv_cap_alloc(nv_cap_t *parent_cap, const char *name)
|
||||
|
||||
Reference in New Issue
Block a user