summaryrefslogtreecommitdiff
path: root/fs/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-31 09:39:56 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-07-31 09:39:56 +0200
commitfe3015748a905e08eb0e1750aa2928f520063d59 (patch)
treed15524d1f7931e8e5964e9ff8368792d09282da5 /fs/file.c
parent16aae4c64600a6319a6f10dbff833fa198bf9599 (diff)
parent5d0c230f1de8c7515b6567d9afba1f196fb4e2f4 (diff)
Merge 6.5-rc4 into tty-next
We need the serial/tty fixes in here as well for testing and future development. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/file.c')
-rw-r--r--fs/file.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/fs/file.c b/fs/file.c
index 7893ea161d77..35c62b54c9d6 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1042,10 +1042,8 @@ unsigned long __fdget_pos(unsigned int fd)
struct file *file = (struct file *)(v & ~3);
if (file && (file->f_mode & FMODE_ATOMIC_POS)) {
- if (file_count(file) > 1) {
- v |= FDPUT_POS_UNLOCK;
- mutex_lock(&file->f_pos_lock);
- }
+ v |= FDPUT_POS_UNLOCK;
+ mutex_lock(&file->f_pos_lock);
}
return v;
}