diff options
Diffstat (limited to 'fs/afs/inode.c')
-rw-r--r-- | fs/afs/inode.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 37c5de793353..e1a523d2e378 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/namei.h> | 23 | #include <linux/namei.h> |
24 | #include <linux/iversion.h> | 24 | #include <linux/iversion.h> |
25 | #include "internal.h" | 25 | #include "internal.h" |
26 | #include "afs_fs.h" | ||
26 | 27 | ||
27 | static const struct inode_operations afs_symlink_inode_operations = { | 28 | static const struct inode_operations afs_symlink_inode_operations = { |
28 | .get_link = page_get_link, | 29 | .get_link = page_get_link, |
@@ -271,13 +272,22 @@ void afs_vnode_commit_status(struct afs_fs_cursor *fc, | |||
271 | 272 | ||
272 | write_seqlock(&vnode->cb_lock); | 273 | write_seqlock(&vnode->cb_lock); |
273 | 274 | ||
274 | afs_apply_status(fc, vnode, scb, expected_version); | 275 | if (scb->have_error) { |
275 | if (scb->have_cb) | 276 | if (scb->status.abort_code == VNOVNODE) { |
276 | afs_apply_callback(fc, vnode, scb, cb_break); | 277 | set_bit(AFS_VNODE_DELETED, &vnode->flags); |
278 | clear_nlink(&vnode->vfs_inode); | ||
279 | __afs_break_callback(vnode); | ||
280 | } | ||
281 | } else { | ||
282 | if (scb->have_status) | ||
283 | afs_apply_status(fc, vnode, scb, expected_version); | ||
284 | if (scb->have_cb) | ||
285 | afs_apply_callback(fc, vnode, scb, cb_break); | ||
286 | } | ||
277 | 287 | ||
278 | write_sequnlock(&vnode->cb_lock); | 288 | write_sequnlock(&vnode->cb_lock); |
279 | 289 | ||
280 | if (fc->ac.error == 0) | 290 | if (fc->ac.error == 0 && scb->have_status) |
281 | afs_cache_permit(vnode, fc->key, cb_break, scb); | 291 | afs_cache_permit(vnode, fc->key, cb_break, scb); |
282 | } | 292 | } |
283 | 293 | ||