diff options
| author | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2012-04-25 08:59:16 +0200 |
| commit | 3dbe927b1eddcbd66da1653168e33122aca84f4e (patch) | |
| tree | 2357f4c55156597b1d07b9ea360b07086cd011e4 /fs/fuse/dir.c | |
| parent | a385ec4f11bdcf81af094c03e2444ee9b7fad2e5 (diff) | |
| parent | 66f75a5d028beaf67c931435fdc3e7823125730c (diff) | |
| download | linux-next-3dbe927b1eddcbd66da1653168e33122aca84f4e.tar.gz linux-next-3dbe927b1eddcbd66da1653168e33122aca84f4e.zip | |
Merge tag 'v3.4-rc4' into perf/core
Merge v3.4-rc4 - we were on -rc2 before.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/fuse/dir.c')
| -rw-r--r-- | fs/fuse/dir.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c index 206632887bb4..df5ac048dc74 100644 --- a/fs/fuse/dir.c +++ b/fs/fuse/dir.c @@ -387,9 +387,6 @@ static int fuse_create_open(struct inode *dir, struct dentry *entry, if (fc->no_create) return -ENOSYS; - if (flags & O_DIRECT) - return -EINVAL; - forget = fuse_alloc_forget(); if (!forget) return -ENOMEM; @@ -644,13 +641,12 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry) fuse_put_request(fc, req); if (!err) { struct inode *inode = entry->d_inode; + struct fuse_inode *fi = get_fuse_inode(inode); - /* - * Set nlink to zero so the inode can be cleared, if the inode - * does have more links this will be discovered at the next - * lookup/getattr. - */ - clear_nlink(inode); + spin_lock(&fc->lock); + fi->attr_version = ++fc->attr_version; + drop_nlink(inode); + spin_unlock(&fc->lock); fuse_invalidate_attr(inode); fuse_invalidate_attr(dir); fuse_invalidate_entry_cache(entry); @@ -762,8 +758,17 @@ static int fuse_link(struct dentry *entry, struct inode *newdir, will reflect changes in the backing inode (link count, etc.) */ - if (!err || err == -EINTR) + if (!err) { + struct fuse_inode *fi = get_fuse_inode(inode); + + spin_lock(&fc->lock); + fi->attr_version = ++fc->attr_version; + inc_nlink(inode); + spin_unlock(&fc->lock); + fuse_invalidate_attr(inode); + } else if (err == -EINTR) { fuse_invalidate_attr(inode); + } return err; } |
