Skip to contentSkip to conversation

linux-next: manual merge of the vfs-brauner tree with the cifs tree

PATCH Mark Brown 1 participant 1 message Oct 9

Subsystems (3)
lore
Share & tools
lore

Mark Brown

author maintainer
#0 lore raw

Hi all,

Today's linux-next merge of the vfs-brauner tree got a conflict in:

fs/smb/client/transport.c

between commit:

fae67a14b8d25 ("smb: client: fast fail sends if need to reconnect")

from the cifs tree and commit:

d0ae35565f5d5 ("smb: prevent TIF_NOTIFY_SIGNAL from interrupting")

from the vfs-brauner tree.

I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.

fs/smb/client/transport.c +0 -0
diff --cc fs/smb/client/transport.c
index cf11af490b0d8,93ff6a4dbb350..0000000000000
@@@ -171,26 -170,11 +170,22 @@@ smb_send_kvec(struct TCP_Server_Info *s
  		 * after the retries we will kill the socket and
  		 * reconnect which may clear the network problem.
  		 *
- 		 * Even if regular signals are masked, EINTR might be
- 		 * propagated from sk_stream_wait_memory() to here when
- 		 * TIF_NOTIFY_SIGNAL is used for task work. For example,
- 		 * certain io_uring completions will use that. Treat
- 		 * having EINTR with pending task work the same as EAGAIN
- 		 * to avoid unnecessary reconnects.
+ 		 * Task work must not abort the send, see signal_pending().
  		 */
- 		rc = sock_sendmsg(ssocket, smb_msg);
+ 		scoped_guard(no_notify_signal)
+ 			rc = sock_sendmsg(ssocket, smb_msg);
 +
 +		/*
 +		 * If need to reconnect, blame it for any non-interrupt error
 +		 * and bail out early, even if -EAGAIN;  reconnect will never
 +		 * happen in parallel as cifs_reconnect() needs server mutex
 +		 * (which we're already holding), so it's pointless to retry.
 +		 */
 +		if (unlikely(rc <= 0 && !is_interrupt_error(rc) &&
 +			     READ_ONCE(server->tcpStatus) == CifsNeedReconnect))
 +			return -ECONNRESET;
 +
- 		if (rc == -EAGAIN || unlikely(rc == -EINTR && task_work_pending(current))) {
+ 		if (rc == -EAGAIN) {
  			retries++;
  			if (retries >= 14 ||
  			    (!server->noblocksnd && (retries > 2))) {