Add samsung specific changes
This commit is contained in:
@@ -60,33 +60,3 @@ config FUSE_BPF
|
||||
help
|
||||
Extends FUSE by adding BPF to prefilter calls and potentially pass to a
|
||||
backing file system
|
||||
|
||||
config FUSE_FREEZABLE_WAIT
|
||||
bool "Freezable wait for request completion"
|
||||
default y
|
||||
depends on FUSE_FS
|
||||
help
|
||||
This allows an application to wait for the request completion
|
||||
in freezable state.
|
||||
|
||||
If you want to allow an application to wait for the request completion
|
||||
in freezable, answer Y.
|
||||
|
||||
config FUSE_SUPPORT_STLOG
|
||||
bool "Enable storage logging to fuse"
|
||||
default y
|
||||
depends on FUSE_FS && PROC_STLOG
|
||||
help
|
||||
This records important events into the storage log buffer for
|
||||
debugging.
|
||||
|
||||
If you want to record major events into the storage log buffer,
|
||||
answer Y.
|
||||
|
||||
config FUSE_WATCHDOG
|
||||
bool "fuse watchdog"
|
||||
default y
|
||||
depends on FUSE_FS
|
||||
help
|
||||
Run fuse watchdog to prepare for the case of the fuse daemon process
|
||||
getting stuck.
|
||||
|
@@ -11,6 +11,5 @@ fuse-y := dev.o dir.o file.o inode.o control.o xattr.o acl.o readdir.o ioctl.o
|
||||
fuse-y += passthrough.o
|
||||
fuse-$(CONFIG_FUSE_DAX) += dax.o
|
||||
fuse-$(CONFIG_FUSE_BPF) += backing.o
|
||||
fuse-$(CONFIG_FUSE_WATCHDOG) += watchdog.o
|
||||
|
||||
virtiofs-y := virtio_fs.o
|
||||
|
@@ -22,7 +22,6 @@
|
||||
#include <linux/swap.h>
|
||||
#include <linux/splice.h>
|
||||
#include <linux/sched.h>
|
||||
#include <linux/sched/mm.h>
|
||||
|
||||
#include <trace/hooks/fuse.h>
|
||||
|
||||
@@ -116,7 +115,7 @@ static struct fuse_req *fuse_get_req(struct fuse_mount *fm, bool for_background)
|
||||
|
||||
if (fuse_block_alloc(fc, for_background)) {
|
||||
err = -EINTR;
|
||||
if (fuse_wait_event_killable_exclusive(fc->blocked_waitq,
|
||||
if (wait_event_killable_exclusive(fc->blocked_waitq,
|
||||
!fuse_block_alloc(fc, for_background)))
|
||||
goto out;
|
||||
}
|
||||
@@ -397,7 +396,7 @@ static void request_wait_answer(struct fuse_req *req)
|
||||
|
||||
if (!test_bit(FR_FORCE, &req->flags)) {
|
||||
/* Only fatal signals may interrupt this */
|
||||
err = fuse_wait_event_killable(req->waitq,
|
||||
err = wait_event_killable(req->waitq,
|
||||
test_bit(FR_FINISHED, &req->flags));
|
||||
if (!err)
|
||||
return;
|
||||
@@ -418,7 +417,7 @@ static void request_wait_answer(struct fuse_req *req)
|
||||
* Either request is already in userspace, or it was forced.
|
||||
* Wait it out.
|
||||
*/
|
||||
fuse_wait_event(req->waitq, test_bit(FR_FINISHED, &req->flags));
|
||||
wait_event(req->waitq, test_bit(FR_FINISHED, &req->flags));
|
||||
}
|
||||
|
||||
static void __fuse_request_send(struct fuse_req *req)
|
||||
@@ -1246,9 +1245,6 @@ static ssize_t fuse_dev_do_read(struct fuse_dev *fud, struct file *file,
|
||||
fc->max_write))
|
||||
return -EINVAL;
|
||||
|
||||
if (!(current->flags & PF_MEMALLOC_NOFS))
|
||||
memalloc_nofs_save();
|
||||
|
||||
restart:
|
||||
for (;;) {
|
||||
spin_lock(&fiq->lock);
|
||||
@@ -2165,9 +2161,6 @@ void fuse_abort_conn(struct fuse_conn *fc)
|
||||
{
|
||||
struct fuse_iqueue *fiq = &fc->iq;
|
||||
|
||||
ST_LOG("<%s> dev = %u:%u fuse abort all requests",
|
||||
__func__, MAJOR(fc->dev), MINOR(fc->dev));
|
||||
|
||||
spin_lock(&fc->lock);
|
||||
if (fc->connected) {
|
||||
struct fuse_dev *fud;
|
||||
@@ -2233,7 +2226,7 @@ void fuse_wait_aborted(struct fuse_conn *fc)
|
||||
{
|
||||
/* matches implicit memory barrier in fuse_drop_waiting() */
|
||||
smp_mb();
|
||||
fuse_wait_event(fc->blocked_waitq, atomic_read(&fc->num_waiting) == 0);
|
||||
wait_event(fc->blocked_waitq, atomic_read(&fc->num_waiting) == 0);
|
||||
}
|
||||
|
||||
int fuse_dev_release(struct inode *inode, struct file *file)
|
||||
|
@@ -2059,7 +2059,7 @@ void fuse_set_nowrite(struct inode *inode)
|
||||
BUG_ON(fi->writectr < 0);
|
||||
fi->writectr += FUSE_NOWRITE;
|
||||
spin_unlock(&fi->lock);
|
||||
fuse_wait_event(fi->page_waitq, fi->writectr == FUSE_NOWRITE);
|
||||
wait_event(fi->page_waitq, fi->writectr == FUSE_NOWRITE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -492,7 +492,7 @@ static void fuse_wait_on_page_writeback(struct inode *inode, pgoff_t index)
|
||||
{
|
||||
struct fuse_inode *fi = get_fuse_inode(inode);
|
||||
|
||||
fuse_wait_event(fi->page_waitq, !fuse_page_is_writeback(inode, index));
|
||||
wait_event(fi->page_waitq, !fuse_page_is_writeback(inode, index));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@@ -36,12 +36,6 @@
|
||||
#include <linux/user_namespace.h>
|
||||
#include <linux/statfs.h>
|
||||
|
||||
#ifdef CONFIG_FUSE_SUPPORT_STLOG
|
||||
#include <linux/fslog.h>
|
||||
#else
|
||||
#define ST_LOG(fmt, ...)
|
||||
#endif
|
||||
|
||||
#define FUSE_SUPER_MAGIC 0x65735546
|
||||
|
||||
/** Default max number of pages that can be used in a single read request */
|
||||
@@ -971,10 +965,6 @@ struct fuse_conn {
|
||||
|
||||
/** Protects passthrough_req */
|
||||
spinlock_t passthrough_req_lock;
|
||||
|
||||
#ifdef CONFIG_FUSE_WATCHDOG
|
||||
struct task_struct *watchdog_thread;
|
||||
#endif
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -2132,35 +2122,4 @@ static inline int fuse_bpf_run(struct bpf_prog *prog, struct fuse_bpf_args *fba)
|
||||
|
||||
#endif /* CONFIG_FUSE_BPF */
|
||||
|
||||
#ifdef CONFIG_FUSE_FREEZABLE_WAIT
|
||||
#define fuse_wait_event(wq, condition) \
|
||||
wait_event_state(wq, condition, (TASK_UNINTERRUPTIBLE|TASK_FREEZABLE))
|
||||
|
||||
#define fuse_wait_event_killable(wq, condition) \
|
||||
wait_event_state(wq, condition, (TASK_KILLABLE|TASK_FREEZABLE))
|
||||
|
||||
#define fuse_wait_event_killable_exclusive(wq, condition) \
|
||||
({ \
|
||||
int ___ret = 0; \
|
||||
might_sleep(); \
|
||||
if (!(condition)) \
|
||||
___ret = ___wait_event(wq, condition, \
|
||||
(TASK_KILLABLE|TASK_FREEZABLE), 1, 0, \
|
||||
schedule()); \
|
||||
___ret; \
|
||||
})
|
||||
#else /* !CONFIG_FUSE_FREEZABLE_WAIT */
|
||||
#define fuse_wait_event wait_event
|
||||
#define fuse_wait_event_killable wait_event_killable
|
||||
#define fuse_wait_event_killable_exclusive wait_event_killable_exclusive
|
||||
#endif /* CONFIG_FUSE_FREEZABLE_WAIT */
|
||||
|
||||
#ifdef CONFIG_FUSE_WATCHDOG
|
||||
void fuse_daemon_watchdog_start(struct fuse_conn *fc);
|
||||
void fuse_daemon_watchdog_stop(struct fuse_conn *fc);
|
||||
#else
|
||||
static inline void fuse_daemon_watchdog_start(struct fuse_conn *fc) {}
|
||||
static inline void fuse_daemon_watchdog_stop(struct fuse_conn *fc) {}
|
||||
#endif
|
||||
|
||||
#endif /* _FS_FUSE_I_H */
|
||||
|
@@ -792,7 +792,7 @@ static void fuse_sync_fs_writes(struct fuse_conn *fc)
|
||||
*/
|
||||
atomic_dec(&bucket->count);
|
||||
|
||||
fuse_wait_event(bucket->waitq, atomic_read(&bucket->count) == 0);
|
||||
wait_event(bucket->waitq, atomic_read(&bucket->count) == 0);
|
||||
|
||||
/* Drop temp count on descendant bucket */
|
||||
fuse_sync_bucket_dec(new_bucket);
|
||||
@@ -1492,11 +1492,6 @@ static void process_init_reply(struct fuse_mount *fm, struct fuse_args *args,
|
||||
fc->conn_error = 1;
|
||||
}
|
||||
|
||||
fuse_daemon_watchdog_start(fc);
|
||||
|
||||
ST_LOG("<%s> dev = %u:%u fuse Initialized",
|
||||
__func__, MAJOR(fc->dev), MINOR(fc->dev));
|
||||
|
||||
fuse_set_initialized(fc);
|
||||
wake_up_all(&fc->blocked_waitq);
|
||||
}
|
||||
@@ -1573,7 +1568,6 @@ void fuse_free_conn(struct fuse_conn *fc)
|
||||
WARN_ON(!list_empty(&fc->devices));
|
||||
idr_for_each(&fc->passthrough_req, free_fuse_passthrough, NULL);
|
||||
idr_destroy(&fc->passthrough_req);
|
||||
fuse_daemon_watchdog_stop(fc);
|
||||
kfree_rcu(fc, rcu);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(fuse_free_conn);
|
||||
|
@@ -209,8 +209,6 @@ ssize_t fuse_passthrough_splice_write(struct pipe_inode_info *pipe,
|
||||
file_end_write(backing_file);
|
||||
fuse_invalidate_attr_mask(inode, FUSE_STATX_MODSIZE);
|
||||
revert_creds(old_cred);
|
||||
if (ret > 0)
|
||||
fuse_copyattr(out, backing_file);
|
||||
inode_unlock(inode);
|
||||
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user