aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/hypfs/hypfs_dbfs.c
diff options
context:
space:
mode:
authorMete Durlu <[email protected]>2024-07-04 14:10:08 +0200
committerVasily Gorbik <[email protected]>2024-07-10 19:50:45 +0200
commitf4493954215ceb8b22aca3ee6b10c6172f20a9fc (patch)
tree0e05b5054b2d3376ba8a111c492f28c267bd94a3 /arch/s390/hypfs/hypfs_dbfs.c
parent97999f8c62a43cf2af5d725b045b82f9b47d83ea (diff)
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 <[email protected]> Reviewed-by: Tobias Huschle <[email protected]> Signed-off-by: Mete Durlu <[email protected]> Signed-off-by: Vasily Gorbik <[email protected]>
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);