diff options
author | David Howells <dhowells@redhat.com> | 2007-04-26 18:59:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-26 18:59:35 -0400 |
commit | 260a980317dac80182dd76140cf67c6e81d6d3dd (patch) | |
tree | 84f3e919fd33be56aad4fc57f5cb844df1a6b952 /fs/afs/file.c | |
parent | c35eccb1f614954b10cba3f74b7c301993b2f42e (diff) |
[AFS]: Add "directory write" support.
Add support for the create, link, symlink, unlink, mkdir, rmdir and
rename VFS operations to the in-kernel AFS filesystem.
Also:
(1) Fix dentry and inode revalidation. d_revalidate should only look at
state of the dentry. Revalidation of the contents of an inode pointed to
by a dentry is now separate.
(2) Fix afs_lookup() to hash negative dentries as well as positive ones.
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r-- | fs/afs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index 101bbb8c0d8b..ae256498f4f7 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c | |||
@@ -50,6 +50,7 @@ int afs_open(struct inode *inode, struct file *file) | |||
50 | { | 50 | { |
51 | struct afs_vnode *vnode = AFS_FS_I(inode); | 51 | struct afs_vnode *vnode = AFS_FS_I(inode); |
52 | struct key *key; | 52 | struct key *key; |
53 | int ret; | ||
53 | 54 | ||
54 | _enter("{%x:%x},", vnode->fid.vid, vnode->fid.vnode); | 55 | _enter("{%x:%x},", vnode->fid.vid, vnode->fid.vnode); |
55 | 56 | ||
@@ -59,6 +60,12 @@ int afs_open(struct inode *inode, struct file *file) | |||
59 | return PTR_ERR(key); | 60 | return PTR_ERR(key); |
60 | } | 61 | } |
61 | 62 | ||
63 | ret = afs_validate(vnode, key); | ||
64 | if (ret < 0) { | ||
65 | _leave(" = %d [val]", ret); | ||
66 | return ret; | ||
67 | } | ||
68 | |||
62 | file->private_data = key; | 69 | file->private_data = key; |
63 | _leave(" = 0"); | 70 | _leave(" = 0"); |
64 | return 0; | 71 | return 0; |