diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2012-06-10 05:01:45 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-07-14 08:33:31 -0400 |
commit | 47237687d73cbeae1dd7a133c3fc3d7239094568 (patch) | |
tree | 1d267d03246f0a16cbff3c8221ee69dd1521f835 /fs/fuse | |
parent | a8277b9baa6268de386529a33061775bc716198b (diff) |
->atomic_open() prototype change - pass int * instead of bool *
... and let finish_open() report having opened the file via that sucker.
Next step: don't modify od->filp at all.
[AV: FILE_CREATE was already used by cifs; Miklos' fix folded]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/fuse')
-rw-r--r-- | fs/fuse/dir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index e42442f1da1..345f78ee5c9 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c | |||
@@ -371,7 +371,7 @@ static struct dentry *fuse_lookup(struct inode *dir, struct dentry *entry, | |||
371 | */ | 371 | */ |
372 | static struct file *fuse_create_open(struct inode *dir, struct dentry *entry, | 372 | static struct file *fuse_create_open(struct inode *dir, struct dentry *entry, |
373 | struct opendata *od, unsigned flags, | 373 | struct opendata *od, unsigned flags, |
374 | umode_t mode) | 374 | umode_t mode, int *opened) |
375 | { | 375 | { |
376 | int err; | 376 | int err; |
377 | struct inode *inode; | 377 | struct inode *inode; |
@@ -450,7 +450,7 @@ static struct file *fuse_create_open(struct inode *dir, struct dentry *entry, | |||
450 | d_instantiate(entry, inode); | 450 | d_instantiate(entry, inode); |
451 | fuse_change_entry_timeout(entry, &outentry); | 451 | fuse_change_entry_timeout(entry, &outentry); |
452 | fuse_invalidate_attr(dir); | 452 | fuse_invalidate_attr(dir); |
453 | file = finish_open(od, entry, generic_file_open); | 453 | file = finish_open(od, entry, generic_file_open, opened); |
454 | if (IS_ERR(file)) { | 454 | if (IS_ERR(file)) { |
455 | fuse_sync_release(ff, flags); | 455 | fuse_sync_release(ff, flags); |
456 | } else { | 456 | } else { |
@@ -472,7 +472,7 @@ out_err: | |||
472 | static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t); | 472 | static int fuse_mknod(struct inode *, struct dentry *, umode_t, dev_t); |
473 | static struct file *fuse_atomic_open(struct inode *dir, struct dentry *entry, | 473 | static struct file *fuse_atomic_open(struct inode *dir, struct dentry *entry, |
474 | struct opendata *od, unsigned flags, | 474 | struct opendata *od, unsigned flags, |
475 | umode_t mode, bool *created) | 475 | umode_t mode, int *opened) |
476 | { | 476 | { |
477 | int err; | 477 | int err; |
478 | struct fuse_conn *fc = get_fuse_conn(dir); | 478 | struct fuse_conn *fc = get_fuse_conn(dir); |
@@ -492,12 +492,12 @@ static struct file *fuse_atomic_open(struct inode *dir, struct dentry *entry, | |||
492 | goto no_open; | 492 | goto no_open; |
493 | 493 | ||
494 | /* Only creates */ | 494 | /* Only creates */ |
495 | *created = true; | 495 | *opened |= FILE_CREATED; |
496 | 496 | ||
497 | if (fc->no_create) | 497 | if (fc->no_create) |
498 | goto mknod; | 498 | goto mknod; |
499 | 499 | ||
500 | file = fuse_create_open(dir, entry, od, flags, mode); | 500 | file = fuse_create_open(dir, entry, od, flags, mode, opened); |
501 | if (PTR_ERR(file) == -ENOSYS) { | 501 | if (PTR_ERR(file) == -ENOSYS) { |
502 | fc->no_create = 1; | 502 | fc->no_create = 1; |
503 | goto mknod; | 503 | goto mknod; |