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

Commit 2a852fd1 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull AFS fixes from David Howells:

 - Stop using the deprecated get_seconds().

 - Don't make tracepoint strings const as the section they go in isn't
   read-only.

 - Differentiate failure due to unmarshalling from other failure cases.
   We shouldn't abort with RXGEN_CC/SS_UNMARSHAL if it's not due to
   unmarshalling.

 - Add a missing unlock_page().

 - Fix the interaction between receiving a notification from a server
   that it has invalidated all outstanding callback promises and a
   client call that we're in the middle of making that will get a new
   promise.

* tag 'afs-fixes-20190413' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
  afs: Fix in-progess ops to ignore server-level callback invalidation
  afs: Unlock pages for __pagevec_release()
  afs: Differentiate abort due to unmarshalling from other errors
  afs: Avoid section confusion in CM_NAME
  afs: avoid deprecated get_seconds()
parents d3ce3b18 eeba1e9c
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -203,7 +203,6 @@ void afs_put_cb_interest(struct afs_net *net, struct afs_cb_interest *cbi)
 */
void afs_init_callback_state(struct afs_server *server)
{
	if (!test_and_clear_bit(AFS_SERVER_FL_NEW, &server->flags))
	server->cb_s_break++;
}

+1 −1
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ static void SRXAFSCB_TellMeAboutYourself(struct work_struct *);
static int afs_deliver_yfs_cb_callback(struct afs_call *);

#define CM_NAME(name) \
	const char afs_SRXCB##name##_name[] __tracepoint_string =	\
	char afs_SRXCB##name##_name[] __tracepoint_string =	\
		"CB." #name

/*
+1 −3
Original line number Diff line number Diff line
@@ -216,9 +216,7 @@ struct inode *afs_iget_pseudo_dir(struct super_block *sb, bool root)
	set_nlink(inode, 2);
	inode->i_uid		= GLOBAL_ROOT_UID;
	inode->i_gid		= GLOBAL_ROOT_GID;
	inode->i_ctime.tv_sec	= get_seconds();
	inode->i_ctime.tv_nsec	= 0;
	inode->i_atime		= inode->i_mtime = inode->i_ctime;
	inode->i_ctime = inode->i_atime = inode->i_mtime = current_time(inode);
	inode->i_blocks		= 0;
	inode_set_iversion_raw(inode, 0);
	inode->i_generation	= 0;
+1 −3
Original line number Diff line number Diff line
@@ -474,7 +474,6 @@ struct afs_server {
	time64_t		put_time;	/* Time at which last put */
	time64_t		update_at;	/* Time at which to next update the record */
	unsigned long		flags;
#define AFS_SERVER_FL_NEW	0		/* New server, don't inc cb_s_break */
#define AFS_SERVER_FL_NOT_READY	1		/* The record is not ready for use */
#define AFS_SERVER_FL_NOT_FOUND	2		/* VL server says no such server */
#define AFS_SERVER_FL_VL_FAIL	3		/* Failed to access VL server */
@@ -827,7 +826,7 @@ static inline struct afs_cb_interest *afs_get_cb_interest(struct afs_cb_interest

static inline unsigned int afs_calc_vnode_cb_break(struct afs_vnode *vnode)
{
	return vnode->cb_break + vnode->cb_s_break + vnode->cb_v_break;
	return vnode->cb_break + vnode->cb_v_break;
}

static inline bool afs_cb_is_broken(unsigned int cb_break,
@@ -835,7 +834,6 @@ static inline bool afs_cb_is_broken(unsigned int cb_break,
				    const struct afs_cb_interest *cbi)
{
	return !cbi || cb_break != (vnode->cb_break +
				    cbi->server->cb_s_break +
				    vnode->volume->cb_v_break);
}

+5 −1
Original line number Diff line number Diff line
@@ -572,13 +572,17 @@ static void afs_deliver_to_call(struct afs_call *call)
		case -ENODATA:
		case -EBADMSG:
		case -EMSGSIZE:
		default:
			abort_code = RXGEN_CC_UNMARSHAL;
			if (state != AFS_CALL_CL_AWAIT_REPLY)
				abort_code = RXGEN_SS_UNMARSHAL;
			rxrpc_kernel_abort_call(call->net->socket, call->rxcall,
						abort_code, ret, "KUM");
			goto local_abort;
		default:
			abort_code = RX_USER_ABORT;
			rxrpc_kernel_abort_call(call->net->socket, call->rxcall,
						abort_code, ret, "KER");
			goto local_abort;
		}
	}

Loading