summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fs/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/file.c b/fs/file.c
index dbca26ef7a01..3fd003a8604f 100644
--- a/fs/file.c
+++ b/fs/file.c
@@ -1049,7 +1049,7 @@ unsigned long __fdget_raw(unsigned int fd)
static inline bool file_needs_f_pos_lock(struct file *file)
{
return (file->f_mode & FMODE_ATOMIC_POS) &&
- (file_count(file) > 1 || S_ISDIR(file_inode(file)->i_mode));
+ (file_count(file) > 1 || file->f_op->iterate_shared);
}
unsigned long __fdget_pos(unsigned int fd)