X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Ffile.c;h=93c5f89c248b07b6fba50fd31f4bd36ba9520fef;hb=9ba52e5812e53f20f23600d79449a3ec05a0254f;hp=ee738ea028fadab5d742445c6e48c151cb53f612;hpb=980f3c344ff1cb4a8be9a169c6bde2dc74ca6288;p=mirror_ubuntu-bionic-kernel.git diff --git a/fs/file.c b/fs/file.c index ee738ea028fa..93c5f89c248b 100644 --- a/fs/file.c +++ b/fs/file.c @@ -638,8 +638,7 @@ static struct file *__fget(unsigned int fd, fmode_t mask) file = fcheck_files(files, fd); if (file) { /* File object ref couldn't be taken */ - if ((file->f_mode & mask) || - !atomic_long_inc_not_zero(&file->f_count)) + if ((file->f_mode & mask) || !get_file_rcu(file)) file = NULL; } rcu_read_unlock();