diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2024-08-13 13:52:30 -0700 |
---|---|---|
committer | Andrii Nakryiko <andrii@kernel.org> | 2024-08-13 13:52:30 -0700 |
commit | 50470d3899cdf06fd58def74dec87f31e13cda6f (patch) | |
tree | 9d4d04c0c394f079127752d6d5b796aa33b903ca /net/core | |
parent | 4a4c013d3385b0db85dc361203dc42ff048b6fd6 (diff) | |
parent | de12c3391bce10504c0e7bd767516c74110cfce1 (diff) |
Merge remote-tracking branch 'vfs/stable-struct_fd'
Merge Al Viro's struct fd refactorings.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/net_namespace.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/core/net_namespace.c b/net/core/net_namespace.c index 6a823ba906c6..18b7c8f31234 100644 --- a/net/core/net_namespace.c +++ b/net/core/net_namespace.c @@ -711,11 +711,11 @@ struct net *get_net_ns_by_fd(int fd) struct fd f = fdget(fd); struct net *net = ERR_PTR(-EINVAL); - if (!f.file) + if (!fd_file(f)) return ERR_PTR(-EBADF); - if (proc_ns_file(f.file)) { - struct ns_common *ns = get_proc_ns(file_inode(f.file)); + if (proc_ns_file(fd_file(f))) { + struct ns_common *ns = get_proc_ns(file_inode(fd_file(f))); if (ns->ops == &netns_operations) net = get_net(container_of(ns, struct net, ns)); } |