mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
fuse: check connection state on notification
Check if the connection is fully initialized and connected before trying to process a notification form the fuse server. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
da6fcc6dbd
commit
e45f591f70
|
|
@ -2098,6 +2098,13 @@ static int fuse_notify_prune(struct fuse_conn *fc, unsigned int size,
|
|||
static int fuse_notify(struct fuse_conn *fc, enum fuse_notify_code code,
|
||||
unsigned int size, struct fuse_copy_state *cs)
|
||||
{
|
||||
/*
|
||||
* Only allow notifications during while the connection is in an
|
||||
* initialized and connected state
|
||||
*/
|
||||
if (!fc->initialized || !fc->connected)
|
||||
return -EINVAL;
|
||||
|
||||
/* Don't try to move folios (yet) */
|
||||
cs->move_folios = false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user