AFS fixes
-----BEGIN PGP SIGNATURE----- iQIVAwUAXLGSOfu3V2unywtrAQKrLA/+MJfgZC9ejNsXqjnnqq48LtBf4B3FhYrO qdPZMKPuy5XxSWBIIGpXtgK7PspkpAD1NCe7qpvibQoa1SJqwa2gc46aN7+gzp3e HETkb4UEXNV5yXSjEA+YOQVa0MiLG2yL6satlqhN4KqoDB5Rj9KoaPFwT79K4SIU 1iME9Q//tA2M7SU8B1FWqyx5kd350A38KoXmHOux7x8K1ZyjEB2DbyKqZBtn6Y/T nfH9ZZioep1JbPFwOuG5NYQH0hP2jUj8ogDnrzzWzn1rQQTWs6wVfigwAh8tc/Dv eDKA8rV9WtZT97ExOG6cQOe0UZsM3NFhnb4P/oSCpl+jtr9WHO3pDmJPLToCr0BA 8xXW7vA+Ejx15dNz4Snnz9yj3FS0UeURSFyhn3g2AFQMK4v9Dd3ZZKOgjR9Czi98 f1UNh768LKY+siOHmoOhgZNlrI8bgamCmXOucPayGzrQ/HVHqAwR6PiUGCzaH+vk +LfDC/Z/ezSqrfQiH/Ji5lLkQkhmYiUTcePn5xdi+kZGWqHwl9qGplVAFUVafs5O Hz+H2F7i8F6Oc4v5hzCHp5aDUP2oEKmruaXJimN+O9SOkUPi72aG8STRpBFnBqf7 77WxNVG/XDFL6I8HukkgRMRePFDXi+2NwGOjB9k8PpAqyA1Vi6sSkCXVkwgAhLRS NCaOR2iDaqE= =cqBe -----END PGP SIGNATURE----- Merge tag 'afs-fixes-20190413' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs 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()
This commit is contained in:
Коммит
2a852fd1ac
|
@ -203,8 +203,7 @@ 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++;
|
||||
server->cb_s_break++;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -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
|
||||
|
||||
/*
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -226,7 +226,6 @@ static struct afs_server *afs_alloc_server(struct afs_net *net,
|
|||
RCU_INIT_POINTER(server->addresses, alist);
|
||||
server->addr_version = alist->version;
|
||||
server->uuid = *uuid;
|
||||
server->flags = (1UL << AFS_SERVER_FL_NEW);
|
||||
server->update_at = ktime_get_real_seconds() + afs_server_update_delay;
|
||||
rwlock_init(&server->fs_lock);
|
||||
INIT_HLIST_HEAD(&server->cb_volumes);
|
||||
|
|
|
@ -264,6 +264,7 @@ static void afs_kill_pages(struct address_space *mapping,
|
|||
first = page->index + 1;
|
||||
lock_page(page);
|
||||
generic_error_remove_page(mapping, page);
|
||||
unlock_page(page);
|
||||
}
|
||||
|
||||
__pagevec_release(&pv);
|
||||
|
|
Загрузка…
Ссылка в новой задаче