fuse: fix fsync on directory
authorMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Dec 2018 09:14:43 +0000 (10:14 +0100)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 3 Dec 2018 09:14:43 +0000 (10:14 +0100)
commita9c2d1e82fc2937baf43c0d400f0c9e87dcf035d
tree31886a807776ec79f0f82b16cd76268c37894e35
parent4fc4bb796b0c75067fd65292dfd874869ff7c9dc
fuse: fix fsync on directory

Commit ab2257e9941b ("fuse: reduce size of struct fuse_inode") moved parts
of fields related to writeback on regular file and to directory caching
into a union.  However fuse_fsync_common() called from fuse_dir_fsync()
touches some writeback related fields, resulting in a crash.

Move writeback related parts from fuse_fsync_common() to fuse_fysnc().

Reported-by: Brett Girton <btgirton@gmail.com>
Tested-by: Brett Girton <btgirton@gmail.com>
Fixes: ab2257e9941b ("fuse: reduce size of struct fuse_inode")
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dir.c
fs/fuse/file.c
fs/fuse/fuse_i.h