.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * Copyright 1997-1998 Transmeta Corporation -- All Rights Reserved |
---|
3 | 4 | * Copyright 2001-2006 Ian Kent <raven@themaw.net> |
---|
4 | | - * |
---|
5 | | - * This file is part of the Linux kernel and is made available under |
---|
6 | | - * the terms of the GNU General Public License, version 2, or at your |
---|
7 | | - * option, any later version, incorporated herein by reference. |
---|
8 | 5 | */ |
---|
9 | 6 | |
---|
10 | 7 | #include <linux/sched/signal.h> |
---|
.. | .. |
---|
20 | 17 | struct autofs_wait_queue *wq, *nwq; |
---|
21 | 18 | |
---|
22 | 19 | mutex_lock(&sbi->wq_mutex); |
---|
23 | | - if (sbi->catatonic) { |
---|
| 20 | + if (sbi->flags & AUTOFS_SBI_CATATONIC) { |
---|
24 | 21 | mutex_unlock(&sbi->wq_mutex); |
---|
25 | 22 | return; |
---|
26 | 23 | } |
---|
27 | 24 | |
---|
28 | 25 | pr_debug("entering catatonic mode\n"); |
---|
29 | 26 | |
---|
30 | | - sbi->catatonic = 1; |
---|
| 27 | + sbi->flags |= AUTOFS_SBI_CATATONIC; |
---|
31 | 28 | wq = sbi->queues; |
---|
32 | 29 | sbi->queues = NULL; /* Erase all wait queues */ |
---|
33 | 30 | while (wq) { |
---|
.. | .. |
---|
56 | 53 | |
---|
57 | 54 | mutex_lock(&sbi->pipe_mutex); |
---|
58 | 55 | while (bytes) { |
---|
59 | | - wr = __kernel_write(file, data, bytes, &file->f_pos); |
---|
| 56 | + wr = __kernel_write(file, data, bytes, NULL); |
---|
60 | 57 | if (wr <= 0) |
---|
61 | 58 | break; |
---|
62 | 59 | data += wr; |
---|
.. | .. |
---|
255 | 252 | struct autofs_wait_queue *wq; |
---|
256 | 253 | struct autofs_info *ino; |
---|
257 | 254 | |
---|
258 | | - if (sbi->catatonic) |
---|
| 255 | + if (sbi->flags & AUTOFS_SBI_CATATONIC) |
---|
259 | 256 | return -ENOENT; |
---|
260 | 257 | |
---|
261 | 258 | /* Wait in progress, continue; */ |
---|
.. | .. |
---|
290 | 287 | if (mutex_lock_interruptible(&sbi->wq_mutex)) |
---|
291 | 288 | return -EINTR; |
---|
292 | 289 | |
---|
293 | | - if (sbi->catatonic) |
---|
| 290 | + if (sbi->flags & AUTOFS_SBI_CATATONIC) |
---|
294 | 291 | return -ENOENT; |
---|
295 | 292 | |
---|
296 | 293 | wq = autofs_find_wait(sbi, qstr); |
---|
.. | .. |
---|
359 | 356 | pid_t tgid; |
---|
360 | 357 | |
---|
361 | 358 | /* In catatonic mode, we don't wait for nobody */ |
---|
362 | | - if (sbi->catatonic) |
---|
| 359 | + if (sbi->flags & AUTOFS_SBI_CATATONIC) |
---|
363 | 360 | return -ENOENT; |
---|
364 | 361 | |
---|
365 | 362 | /* |
---|