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

Commit cee23c79 authored by Denis Cheng's avatar Denis Cheng Committed by Steven Whitehouse
Browse files

[GFS2] use an temp variable to reduce a spin_unlock



this is more clear.

Signed-off-by: default avatarDenis Cheng <crquan@gmail.com>
Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 6760bdcd
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -346,15 +346,16 @@ static ssize_t dev_write(struct file *file, const char __user *u, size_t count,

static unsigned int dev_poll(struct file *file, poll_table *wait)
{
	unsigned int mask = 0;

	poll_wait(file, &send_wq, wait);

	spin_lock(&ops_lock);
	if (!list_empty(&send_list)) {
		spin_unlock(&ops_lock);
		return POLLIN | POLLRDNORM;
	}
	if (!list_empty(&send_list))
		mask = POLLIN | POLLRDNORM;
	spin_unlock(&ops_lock);
	return 0;

	return mask;
}

static const struct file_operations dev_fops = {