dev.c (3a2b5b9cd9610f789f5e5f91a010d9fa3ca78632) | dev.c (e96edd94d0887707fc41c5d21d5b488edcd31689) |
---|---|
1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 1289 unchanged lines hidden (view full) --- 1298 cs->req = req; 1299 err = fuse_copy_one(cs, &in->h, sizeof(in->h)); 1300 if (!err) 1301 err = fuse_copy_args(cs, in->numargs, in->argpages, 1302 (struct fuse_arg *) in->args, 0); 1303 fuse_copy_finish(cs); 1304 spin_lock(&fc->lock); 1305 clear_bit(FR_LOCKED, &req->flags); | 1/* 2 FUSE: Filesystem in Userspace 3 Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu> 4 5 This program can be distributed under the terms of the GNU GPL. 6 See the file COPYING. 7*/ 8 --- 1289 unchanged lines hidden (view full) --- 1298 cs->req = req; 1299 err = fuse_copy_one(cs, &in->h, sizeof(in->h)); 1300 if (!err) 1301 err = fuse_copy_args(cs, in->numargs, in->argpages, 1302 (struct fuse_arg *) in->args, 0); 1303 fuse_copy_finish(cs); 1304 spin_lock(&fc->lock); 1305 clear_bit(FR_LOCKED, &req->flags); |
1306 if (!fc->connected) { | 1306 if (!fpq->connected) { |
1307 request_end(fc, req); 1308 return -ENODEV; 1309 } 1310 if (err) { 1311 req->out.h.error = -EIO; 1312 request_end(fc, req); 1313 return err; 1314 } --- 571 unchanged lines hidden (view full) --- 1886 } 1887 1888 err = -EINVAL; 1889 if (oh.error <= -1000 || oh.error > 0) 1890 goto err_finish; 1891 1892 spin_lock(&fc->lock); 1893 err = -ENOENT; | 1307 request_end(fc, req); 1308 return -ENODEV; 1309 } 1310 if (err) { 1311 req->out.h.error = -EIO; 1312 request_end(fc, req); 1313 return err; 1314 } --- 571 unchanged lines hidden (view full) --- 1886 } 1887 1888 err = -EINVAL; 1889 if (oh.error <= -1000 || oh.error > 0) 1890 goto err_finish; 1891 1892 spin_lock(&fc->lock); 1893 err = -ENOENT; |
1894 if (!fc->connected) | 1894 if (!fpq->connected) |
1895 goto err_unlock; 1896 1897 req = request_find(fpq, oh.unique); 1898 if (!req) 1899 goto err_unlock; 1900 1901 /* Is it an interrupt reply? */ 1902 if (req->intr_unique == oh.unique) { --- 20 unchanged lines hidden (view full) --- 1923 cs->move_pages = 0; 1924 spin_unlock(&fc->lock); 1925 1926 err = copy_out_args(cs, &req->out, nbytes); 1927 fuse_copy_finish(cs); 1928 1929 spin_lock(&fc->lock); 1930 clear_bit(FR_LOCKED, &req->flags); | 1895 goto err_unlock; 1896 1897 req = request_find(fpq, oh.unique); 1898 if (!req) 1899 goto err_unlock; 1900 1901 /* Is it an interrupt reply? */ 1902 if (req->intr_unique == oh.unique) { --- 20 unchanged lines hidden (view full) --- 1923 cs->move_pages = 0; 1924 spin_unlock(&fc->lock); 1925 1926 err = copy_out_args(cs, &req->out, nbytes); 1927 fuse_copy_finish(cs); 1928 1929 spin_lock(&fc->lock); 1930 clear_bit(FR_LOCKED, &req->flags); |
1931 if (!fc->connected) | 1931 if (!fpq->connected) |
1932 err = -ENOENT; 1933 else if (err) 1934 req->out.h.error = -EIO; 1935 request_end(fc, req); 1936 1937 return err ? err : nbytes; 1938 1939 err_unlock: --- 180 unchanged lines hidden (view full) --- 2120 if (fc->connected) { 2121 struct fuse_req *req, *next; 2122 LIST_HEAD(to_end1); 2123 LIST_HEAD(to_end2); 2124 2125 fc->connected = 0; 2126 fc->blocked = 0; 2127 fuse_set_initialized(fc); | 1932 err = -ENOENT; 1933 else if (err) 1934 req->out.h.error = -EIO; 1935 request_end(fc, req); 1936 1937 return err ? err : nbytes; 1938 1939 err_unlock: --- 180 unchanged lines hidden (view full) --- 2120 if (fc->connected) { 2121 struct fuse_req *req, *next; 2122 LIST_HEAD(to_end1); 2123 LIST_HEAD(to_end2); 2124 2125 fc->connected = 0; 2126 fc->blocked = 0; 2127 fuse_set_initialized(fc); |
2128 fpq->connected = 0; |
|
2128 list_for_each_entry_safe(req, next, &fpq->io, list) { 2129 req->out.h.error = -ECONNABORTED; 2130 spin_lock(&req->waitq.lock); 2131 set_bit(FR_ABORTED, &req->flags); 2132 if (!test_bit(FR_LOCKED, &req->flags)) 2133 list_move(&req->list, &to_end1); 2134 spin_unlock(&req->waitq.lock); 2135 } --- 97 unchanged lines hidden --- | 2129 list_for_each_entry_safe(req, next, &fpq->io, list) { 2130 req->out.h.error = -ECONNABORTED; 2131 spin_lock(&req->waitq.lock); 2132 set_bit(FR_ABORTED, &req->flags); 2133 if (!test_bit(FR_LOCKED, &req->flags)) 2134 list_move(&req->list, &to_end1); 2135 spin_unlock(&req->waitq.lock); 2136 } --- 97 unchanged lines hidden --- |