Rename the 'interrupted' flag to 'aborted', since it indicates exactly that,
and next patch will introduce an 'interrupted' flag for a
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
/*
* This function is called when a request is finished. Either a reply
/*
* This function is called when a request is finished. Either a reply
- * has arrived or it was interrupted (and not yet sent) or some error
+ * has arrived or it was aborted (and not yet sent) or some error
* occurred during communication with userspace, or the device file
* was closed. The requester thread is woken up (if still waiting),
* the 'end' callback is called if given, else the reference to the
* occurred during communication with userspace, or the device file
* was closed. The requester thread is woken up (if still waiting),
* the 'end' callback is called if given, else the reference to the
restore_sigs(&oldset);
}
spin_lock(&fc->lock);
restore_sigs(&oldset);
}
spin_lock(&fc->lock);
- if (req->state == FUSE_REQ_FINISHED && !req->interrupted)
+ if (req->state == FUSE_REQ_FINISHED && !req->aborted)
- if (!req->interrupted) {
req->out.h.error = -EINTR;
req->out.h.error = -EINTR;
}
if (req->locked) {
/* This is uninterruptible sleep, because data is
}
if (req->locked) {
/* This is uninterruptible sleep, because data is
/*
* Lock the request. Up to the next unlock_request() there mustn't be
* anything that could cause a page-fault. If the request was already
/*
* Lock the request. Up to the next unlock_request() there mustn't be
* anything that could cause a page-fault. If the request was already
- * interrupted bail out.
*/
static int lock_request(struct fuse_conn *fc, struct fuse_req *req)
{
int err = 0;
if (req) {
spin_lock(&fc->lock);
*/
static int lock_request(struct fuse_conn *fc, struct fuse_req *req)
{
int err = 0;
if (req) {
spin_lock(&fc->lock);
err = -ENOENT;
else
req->locked = 1;
err = -ENOENT;
else
req->locked = 1;
- * Unlock request. If it was interrupted during being locked, the
+ * Unlock request. If it was aborted during being locked, the
* requester thread is currently waiting for it to be unlocked, so
* wake it up.
*/
* requester thread is currently waiting for it to be unlocked, so
* wake it up.
*/
if (req) {
spin_lock(&fc->lock);
req->locked = 0;
if (req) {
spin_lock(&fc->lock);
req->locked = 0;
wake_up(&req->waitq);
spin_unlock(&fc->lock);
}
wake_up(&req->waitq);
spin_unlock(&fc->lock);
}
* Read a single request into the userspace filesystem's buffer. This
* function waits until a request is available, then removes it from
* the pending list and copies request data to userspace buffer. If
* Read a single request into the userspace filesystem's buffer. This
* function waits until a request is available, then removes it from
* the pending list and copies request data to userspace buffer. If
- * no reply is needed (FORGET) or request has been interrupted or
- * there was an error during the copying then it's finished by calling
+ * no reply is needed (FORGET) or request has been aborted or there
+ * was an error during the copying then it's finished by calling
* request_end(). Otherwise add it to the processing list, and set
* the 'sent' flag.
*/
* request_end(). Otherwise add it to the processing list, and set
* the 'sent' flag.
*/
fuse_copy_finish(&cs);
spin_lock(&fc->lock);
req->locked = 0;
fuse_copy_finish(&cs);
spin_lock(&fc->lock);
req->locked = 0;
- if (!err && req->interrupted)
+ if (!err && req->aborted)
err = -ENOENT;
if (err) {
err = -ENOENT;
if (err) {
req->out.h.error = -EIO;
request_end(fc, req);
return err;
req->out.h.error = -EIO;
request_end(fc, req);
return err;
if (!req)
goto err_unlock;
if (!req)
goto err_unlock;
- if (req->interrupted) {
spin_unlock(&fc->lock);
fuse_copy_finish(&cs);
spin_lock(&fc->lock);
spin_unlock(&fc->lock);
fuse_copy_finish(&cs);
spin_lock(&fc->lock);
spin_lock(&fc->lock);
req->locked = 0;
if (!err) {
spin_lock(&fc->lock);
req->locked = 0;
if (!err) {
- } else if (!req->interrupted)
+ } else if (!req->aborted)
req->out.h.error = -EIO;
request_end(fc, req);
req->out.h.error = -EIO;
request_end(fc, req);
/*
* Abort requests under I/O
*
/*
* Abort requests under I/O
*
- * The requests are set to interrupted and finished, and the request
+ * The requests are set to aborted and finished, and the request
* waiter is woken up. This will make request_wait_answer() wait
* until the request is unlocked and then return.
*
* waiter is woken up. This will make request_wait_answer() wait
* until the request is unlocked and then return.
*
list_entry(fc->io.next, struct fuse_req, list);
void (*end) (struct fuse_conn *, struct fuse_req *) = req->end;
list_entry(fc->io.next, struct fuse_req, list);
void (*end) (struct fuse_conn *, struct fuse_req *) = req->end;
req->out.h.error = -ECONNABORTED;
req->state = FUSE_REQ_FINISHED;
list_del_init(&req->list);
req->out.h.error = -ECONNABORTED;
req->state = FUSE_REQ_FINISHED;
list_del_init(&req->list);
* onto the pending list is prevented by req->connected being false.
*
* Progression of requests under I/O to the processing list is
* onto the pending list is prevented by req->connected being false.
*
* Progression of requests under I/O to the processing list is
- * prevented by the req->interrupted flag being true for these
- * requests. For this reason requests on the io list must be aborted
- * first.
+ * prevented by the req->aborted flag being true for these requests.
+ * For this reason requests on the io list must be aborted first.
*/
void fuse_abort_conn(struct fuse_conn *fc)
{
*/
void fuse_abort_conn(struct fuse_conn *fc)
{
/** Force sending of the request even if interrupted */
unsigned force:1;
/** Force sending of the request even if interrupted */
unsigned force:1;
- /** The request was interrupted */
- unsigned interrupted:1;
+ /** The request was aborted */
+ unsigned aborted:1;
/** Request is sent in the background */
unsigned background:1;
/** Request is sent in the background */
unsigned background:1;