Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e09d0fb authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: fix ceph_get_caps() interruption



Commit 5c341ee3 ("ceph: fix scheduler warning due to nested
blocking") causes infinite loop when process is interrupted.  Fix it.

Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
parent 49def185
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -2591,8 +2591,13 @@ int ceph_get_caps(struct ceph_inode_info *ci, int need, int want,
			add_wait_queue(&ci->i_cap_wq, &wait);

			while (!try_get_cap_refs(ci, need, want, endoff,
						 true, &_got, &err))
						 true, &_got, &err)) {
				if (signal_pending(current)) {
					ret = -ERESTARTSYS;
					break;
				}
				wait_woken(&wait, TASK_INTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT);
			}

			remove_wait_queue(&ci->i_cap_wq, &wait);