Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 208331
b: refs/heads/master
c: 4aeefdc
h: refs/heads/master
i:
  208329: 0f5bfb7
  208327: 3ac5f7b
v: v3
  • Loading branch information
Jens Axboe committed Aug 7, 2010
1 parent 285ae7a commit 57461c8
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7cc015811ef8992dfcce314d0ed9642bc18143d1
refs/heads/master: 4aeefdc69f7b6f3f287e6fd8d4b213953b9e92d8
12 changes: 6 additions & 6 deletions trunk/fs/coda/psdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static ssize_t coda_psdev_write(struct file *file, const char __user *buf,
nbytes = req->uc_outSize; /* don't have more space! */
}
if (copy_from_user(req->uc_data, buf, nbytes)) {
req->uc_flags |= REQ_ABORT;
req->uc_flags |= CODA_REQ_ABORT;
wake_up(&req->uc_sleep);
retval = -EFAULT;
goto out;
Expand Down Expand Up @@ -254,8 +254,8 @@ static ssize_t coda_psdev_read(struct file * file, char __user * buf,
retval = -EFAULT;

/* If request was not a signal, enqueue and don't free */
if (!(req->uc_flags & REQ_ASYNC)) {
req->uc_flags |= REQ_READ;
if (!(req->uc_flags & CODA_REQ_ASYNC)) {
req->uc_flags |= CODA_REQ_READ;
list_add_tail(&(req->uc_chain), &vcp->vc_processing);
goto out;
}
Expand Down Expand Up @@ -315,19 +315,19 @@ static int coda_psdev_release(struct inode * inode, struct file * file)
list_del(&req->uc_chain);

/* Async requests need to be freed here */
if (req->uc_flags & REQ_ASYNC) {
if (req->uc_flags & CODA_REQ_ASYNC) {
CODA_FREE(req->uc_data, sizeof(struct coda_in_hdr));
kfree(req);
continue;
}
req->uc_flags |= REQ_ABORT;
req->uc_flags |= CODA_REQ_ABORT;
wake_up(&req->uc_sleep);
}

list_for_each_entry_safe(req, tmp, &vcp->vc_processing, uc_chain) {
list_del(&req->uc_chain);

req->uc_flags |= REQ_ABORT;
req->uc_flags |= CODA_REQ_ABORT;
wake_up(&req->uc_sleep);
}

Expand Down
12 changes: 6 additions & 6 deletions trunk/fs/coda/upcall.c
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ static void coda_unblock_signals(sigset_t *old)
(((r)->uc_opcode != CODA_CLOSE && \
(r)->uc_opcode != CODA_STORE && \
(r)->uc_opcode != CODA_RELEASE) || \
(r)->uc_flags & REQ_READ))
(r)->uc_flags & CODA_REQ_READ))

static inline void coda_waitfor_upcall(struct upc_req *req)
{
Expand All @@ -624,7 +624,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
set_current_state(TASK_UNINTERRUPTIBLE);

/* got a reply */
if (req->uc_flags & (REQ_WRITE | REQ_ABORT))
if (req->uc_flags & (CODA_REQ_WRITE | CODA_REQ_ABORT))
break;

if (blocked && time_after(jiffies, timeout) &&
Expand Down Expand Up @@ -708,7 +708,7 @@ static int coda_upcall(struct venus_comm *vcp,
coda_waitfor_upcall(req);

/* Op went through, interrupt or not... */
if (req->uc_flags & REQ_WRITE) {
if (req->uc_flags & CODA_REQ_WRITE) {
out = (union outputArgs *)req->uc_data;
/* here we map positive Venus errors to kernel errors */
error = -out->oh.result;
Expand All @@ -717,13 +717,13 @@ static int coda_upcall(struct venus_comm *vcp,
}

error = -EINTR;
if ((req->uc_flags & REQ_ABORT) || !signal_pending(current)) {
if ((req->uc_flags & CODA_REQ_ABORT) || !signal_pending(current)) {
printk(KERN_WARNING "coda: Unexpected interruption.\n");
goto exit;
}

/* Interrupted before venus read it. */
if (!(req->uc_flags & REQ_READ))
if (!(req->uc_flags & CODA_REQ_READ))
goto exit;

/* Venus saw the upcall, make sure we can send interrupt signal */
Expand All @@ -747,7 +747,7 @@ static int coda_upcall(struct venus_comm *vcp,
sig_inputArgs->ih.opcode = CODA_SIGNAL;
sig_inputArgs->ih.unique = req->uc_unique;

sig_req->uc_flags = REQ_ASYNC;
sig_req->uc_flags = CODA_REQ_ASYNC;
sig_req->uc_opcode = sig_inputArgs->ih.opcode;
sig_req->uc_unique = sig_inputArgs->ih.unique;
sig_req->uc_inSize = sizeof(struct coda_in_hdr);
Expand Down
8 changes: 4 additions & 4 deletions trunk/include/linux/coda_psdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ struct upc_req {
wait_queue_head_t uc_sleep; /* process' wait queue */
};

#define REQ_ASYNC 0x1
#define REQ_READ 0x2
#define REQ_WRITE 0x4
#define REQ_ABORT 0x8
#define CODA_REQ_ASYNC 0x1
#define CODA_REQ_READ 0x2
#define CODA_REQ_WRITE 0x4
#define CODA_REQ_ABORT 0x8

#endif

0 comments on commit 57461c8

Please sign in to comment.