All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tools/xenstored: Remove redundant check in socket_can_process()
@ 2021-06-24 14:46 Julien Grall
  2021-06-24 14:53 ` Juergen Gross
  0 siblings, 1 reply; 3+ messages in thread
From: Julien Grall @ 2021-06-24 14:46 UTC (permalink / raw)
  To: xen-devel
  Cc: raphning, doebel, Julien Grall, Ian Jackson, Wei Liu,
	Juergen Gross, Julien Grall

From: Julien Grall <jgrall@amazon.com>

Commit 3adfb50315d9 ("tools/xenstored: Introduce a wrapper for
conn->funcs->can_{read, write}") consolidated the check
!conn->is_ignored in two new wrappers.

This means the check in socket_can_process() is now redundant. In
fact it should have been removed in orignal commit (as it was done
for the domain helpers).

Reported-by: Raphael Ning <raphning@amazon.com
Signed-off-by: Julien Grall <jgrall@amazon.com>
---
 tools/xenstore/xenstored_core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/xenstore/xenstored_core.c b/tools/xenstore/xenstored_core.c
index 9ffd2ac66d3e..cf7297a96cb1 100644
--- a/tools/xenstore/xenstored_core.c
+++ b/tools/xenstore/xenstored_core.c
@@ -1752,7 +1752,7 @@ static bool socket_can_process(struct connection *conn, int mask)
 		return false;
 	}
 
-	return (fds[conn->pollfd_idx].revents & mask) && !conn->is_ignored;
+	return (fds[conn->pollfd_idx].revents & mask);
 }
 
 static bool socket_can_write(struct connection *conn)
-- 
2.17.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/xenstored: Remove redundant check in socket_can_process()
  2021-06-24 14:46 [PATCH] tools/xenstored: Remove redundant check in socket_can_process() Julien Grall
@ 2021-06-24 14:53 ` Juergen Gross
  2021-06-24 14:56   ` Julien Grall
  0 siblings, 1 reply; 3+ messages in thread
From: Juergen Gross @ 2021-06-24 14:53 UTC (permalink / raw)
  To: Julien Grall, xen-devel
  Cc: raphning, doebel, Julien Grall, Ian Jackson, Wei Liu


[-- Attachment #1.1.1: Type: text/plain, Size: 590 bytes --]

On 24.06.21 16:46, Julien Grall wrote:
> From: Julien Grall <jgrall@amazon.com>
> 
> Commit 3adfb50315d9 ("tools/xenstored: Introduce a wrapper for
> conn->funcs->can_{read, write}") consolidated the check
> !conn->is_ignored in two new wrappers.
> 
> This means the check in socket_can_process() is now redundant. In
> fact it should have been removed in orignal commit (as it was done
> for the domain helpers).
> 
> Reported-by: Raphael Ning <raphning@amazon.com
> Signed-off-by: Julien Grall <jgrall@amazon.com>

Reviewed-by: Juergen Gross <jgross@suse.com>


Juergen

[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 3135 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 495 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] tools/xenstored: Remove redundant check in socket_can_process()
  2021-06-24 14:53 ` Juergen Gross
@ 2021-06-24 14:56   ` Julien Grall
  0 siblings, 0 replies; 3+ messages in thread
From: Julien Grall @ 2021-06-24 14:56 UTC (permalink / raw)
  To: Juergen Gross, xen-devel
  Cc: raphning, doebel, Julien Grall, Ian Jackson, Wei Liu

Hi Juergen,

On 24/06/2021 16:53, Juergen Gross wrote:
> On 24.06.21 16:46, Julien Grall wrote:
>> From: Julien Grall <jgrall@amazon.com>
>>
>> Commit 3adfb50315d9 ("tools/xenstored: Introduce a wrapper for
>> conn->funcs->can_{read, write}") consolidated the check
>> !conn->is_ignored in two new wrappers.
>>
>> This means the check in socket_can_process() is now redundant. In
>> fact it should have been removed in orignal commit (as it was done
>> for the domain helpers).
>>
>> Reported-by: Raphael Ning <raphning@amazon.com
>> Signed-off-by: Julien Grall <jgrall@amazon.com>
> 
> Reviewed-by: Juergen Gross <jgross@suse.com>

Thanks! Committed.

Cheers,

-- 
Julien Grall


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-24 14:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 14:46 [PATCH] tools/xenstored: Remove redundant check in socket_can_process() Julien Grall
2021-06-24 14:53 ` Juergen Gross
2021-06-24 14:56   ` Julien Grall

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.