summaryrefslogtreecommitdiff
path: root/arch/s390/hypfs/hypfs_dbfs.c
diff options
context:
space:
mode:
authorMete Durlu <meted@linux.ibm.com>2024-07-04 15:10:08 +0300
committerVasily Gorbik <gor@linux.ibm.com>2024-07-10 20:50:45 +0300
commitf4493954215ceb8b22aca3ee6b10c6172f20a9fc (patch)
tree0e05b5054b2d3376ba8a111c492f28c267bd94a3 /arch/s390/hypfs/hypfs_dbfs.c
parent97999f8c62a43cf2af5d725b045b82f9b47d83ea (diff)
downloadlinux-f4493954215ceb8b22aca3ee6b10c6172f20a9fc.tar.xz
s390/hypfs_diag: Diag204 busy loop
When diag204 busy-indiciation facility is installed and diag204 is returning busy, hypfs diag204 handler now does an interruptable busy wait until diag204 is no longer busy. If there is a signal pending, call would be restarted with -ERESTARTSYSCALL, except for fatal signals. Acked-by: Heiko Carstens <hca@linux.ibm.com> Reviewed-by: Tobias Huschle <huschle@linux.ibm.com> Signed-off-by: Mete Durlu <meted@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/hypfs/hypfs_dbfs.c')
-rw-r--r--arch/s390/hypfs/hypfs_dbfs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/s390/hypfs/hypfs_dbfs.c b/arch/s390/hypfs/hypfs_dbfs.c
index 4024599eb448..0e855c5e91c5 100644
--- a/arch/s390/hypfs/hypfs_dbfs.c
+++ b/arch/s390/hypfs/hypfs_dbfs.c
@@ -39,7 +39,9 @@ static ssize_t dbfs_read(struct file *file, char __user *buf,
return 0;
df = file_inode(file)->i_private;
- mutex_lock(&df->lock);
+ if (mutex_lock_interruptible(&df->lock))
+ return -ERESTARTSYS;
+
data = hypfs_dbfs_data_alloc(df);
if (!data) {
mutex_unlock(&df->lock);