diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2005-11-07 03:59:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 10:53:42 -0500 |
commit | fd72faac95d7e47610e981d7ed7b3c1529e55c88 (patch) | |
tree | 65cde1eb6958f410c4b4c72e322fd59db463150f /fs/fuse/dev.c | |
parent | 31d40d74b402a6fa18a006fb3745f64609f35b77 (diff) |
[PATCH] FUSE: atomic create+open
This patch adds an atomic create+open operation. This does not yet work if
the file type changes between lookup and create+open, but solves the
permission checking problems for the separte create and open methods.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r-- | fs/fuse/dev.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c index a6f90a6c754a..8f873e621f41 100644 --- a/fs/fuse/dev.c +++ b/fs/fuse/dev.c | |||
@@ -184,6 +184,13 @@ static void request_end(struct fuse_conn *fc, struct fuse_req *req) | |||
184 | fuse_putback_request() */ | 184 | fuse_putback_request() */ |
185 | for (i = 1; i < FUSE_MAX_OUTSTANDING; i++) | 185 | for (i = 1; i < FUSE_MAX_OUTSTANDING; i++) |
186 | up(&fc->outstanding_sem); | 186 | up(&fc->outstanding_sem); |
187 | } else if (req->in.h.opcode == FUSE_RELEASE && req->inode == NULL) { | ||
188 | /* Special case for failed iget in CREATE */ | ||
189 | u64 nodeid = req->in.h.nodeid; | ||
190 | __fuse_get_request(req); | ||
191 | fuse_reset_request(req); | ||
192 | fuse_send_forget(fc, req, nodeid, 1); | ||
193 | putback = 0; | ||
187 | } | 194 | } |
188 | if (putback) | 195 | if (putback) |
189 | fuse_putback_request(fc, req); | 196 | fuse_putback_request(fc, req); |