Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 310479
b: refs/heads/master
c: 519c604
h: refs/heads/master
i:
  310477: 3543d1d
  310475: f6a82b9
  310471: e7d1e91
  310463: 8771150
v: v3
  • Loading branch information
Miklos Szeredi committed Apr 26, 2012
1 parent d5daddf commit 170fd6a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 05ba1f0823004e947748523782e9c2f07f3bff0d
refs/heads/master: 519c6040ce04474bc893774f866fd8d907b20429
7 changes: 7 additions & 0 deletions trunk/fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2185,6 +2185,9 @@ long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
};
int err;

if (fc->no_fallocate)
return -EOPNOTSUPP;

req = fuse_get_req(fc);
if (IS_ERR(req))
return PTR_ERR(req);
Expand All @@ -2196,6 +2199,10 @@ long fuse_file_fallocate(struct file *file, int mode, loff_t offset,
req->in.args[0].value = &inarg;
fuse_request_send(fc, req);
err = req->out.h.error;
if (err == -ENOSYS) {
fc->no_fallocate = 1;
err = -EOPNOTSUPP;
}
fuse_put_request(fc, req);

return err;
Expand Down
3 changes: 3 additions & 0 deletions trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,9 @@ struct fuse_conn {
/** Are BSD file locking primitives not implemented by fs? */
unsigned no_flock:1;

/** Is fallocate not implemented by fs? */
unsigned no_fallocate:1;

/** The number of requests waiting for completion */
atomic_t num_waiting;

Expand Down

0 comments on commit 170fd6a

Please sign in to comment.