aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fuse
diff options
context:
space:
mode:
authorcodeworkx <codeworkx@cyanogenmod.com>2012-09-22 09:48:20 +0200
committercodeworkx <codeworkx@cyanogenmod.com>2012-09-22 14:02:16 +0200
commit2489007e7d740ccbc3e0a202914e243ad5178787 (patch)
treeb8e6380ea7b1da63474ad68a5dba997e01146043 /fs/fuse
parent5f67568eb31e3a813c7c52461dcf66ade15fc2e7 (diff)
downloadkernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.zip
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.gz
kernel_samsung_smdk4412-2489007e7d740ccbc3e0a202914e243ad5178787.tar.bz2
merge opensource jb u5
Change-Id: I1aaec157aa196f3448eff8636134fce89a814cf2
Diffstat (limited to 'fs/fuse')
-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)
{