aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p
diff options
context:
space:
mode:
Diffstat (limited to 'net/9p')
-rw-r--r--net/9p/trans_fd.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/net/9p/trans_fd.c b/net/9p/trans_fd.c
index 6c88e8983750..f6d4af16cb19 100644
--- a/net/9p/trans_fd.c
+++ b/net/9p/trans_fd.c
@@ -1344,7 +1344,6 @@ p9_fd_poll(struct p9_trans *trans, struct poll_table_struct *pt)
1344{ 1344{
1345 int ret, n; 1345 int ret, n;
1346 struct p9_trans_fd *ts = NULL; 1346 struct p9_trans_fd *ts = NULL;
1347 mm_segment_t oldfs;
1348 1347
1349 if (trans && trans->status == Connected) 1348 if (trans && trans->status == Connected)
1350 ts = trans->priv; 1349 ts = trans->priv;
@@ -1358,24 +1357,17 @@ p9_fd_poll(struct p9_trans *trans, struct poll_table_struct *pt)
1358 if (!ts->wr->f_op || !ts->wr->f_op->poll) 1357 if (!ts->wr->f_op || !ts->wr->f_op->poll)
1359 return -EIO; 1358 return -EIO;
1360 1359
1361 oldfs = get_fs();
1362 set_fs(get_ds());
1363
1364 ret = ts->rd->f_op->poll(ts->rd, pt); 1360 ret = ts->rd->f_op->poll(ts->rd, pt);
1365 if (ret < 0) 1361 if (ret < 0)
1366 goto end; 1362 return ret;
1367 1363
1368 if (ts->rd != ts->wr) { 1364 if (ts->rd != ts->wr) {
1369 n = ts->wr->f_op->poll(ts->wr, pt); 1365 n = ts->wr->f_op->poll(ts->wr, pt);
1370 if (n < 0) { 1366 if (n < 0)
1371 ret = n; 1367 return n;
1372 goto end;
1373 }
1374 ret = (ret & ~POLLOUT) | (n & ~POLLIN); 1368 ret = (ret & ~POLLOUT) | (n & ~POLLIN);
1375 } 1369 }
1376 1370
1377end:
1378 set_fs(oldfs);
1379 return ret; 1371 return ret;
1380} 1372}
1381 1373