aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 5a6c6dc..9f241a4 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -242,25 +242,27 @@ static u64 fuse_get_unique(struct fuse_conn *fc)
static inline int is_rt(struct fuse_conn *fc)
{
- /* Returns 1 if request is RT class */
- /* && FUSE_HANDLE_RT_CLASS bit of fc->flags is set. */
- /* FUSE_HANDLE_RT_CLASS bit is set by 'handle_rt_class' */
- /* mount option while mounting a file system. */
+ /*
+ * Returns 1 if a process is RT class.
+ */
struct io_context *ioc;
+ int ret = 0;
if (!fc)
return 0;
-
if (!(fc->flags & FUSE_HANDLE_RT_CLASS)) /* Don't handle RT class */
return 0;
ioc = get_io_context(GFP_NOWAIT, 0);
- if (ioc && IOPRIO_PRIO_CLASS(ioc->ioprio) == IOPRIO_CLASS_RT)
- return 1;
+ if(!ioc)
+ return 0;
- return 0;
-}
+ if(IOPRIO_PRIO_CLASS(ioc->ioprio) == IOPRIO_CLASS_RT)
+ ret = 1;
+ put_io_context(ioc);
+ return ret;
+}
static void queue_request(struct fuse_conn *fc, struct fuse_req *req)
{