From 260a980317dac80182dd76140cf67c6e81d6d3dd Mon Sep 17 00:00:00 2001 From: David Howells Date: Thu, 26 Apr 2007 15:59:35 -0700 Subject: [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 Signed-off-by: David S. Miller --- fs/afs/file.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'fs/afs/file.c') diff --git a/fs/afs/file.c b/fs/afs/file.c index 101bbb8c0d8..ae256498f4f 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -50,6 +50,7 @@ int afs_open(struct inode *inode, struct file *file) { struct afs_vnode *vnode = AFS_FS_I(inode); struct key *key; + int ret; _enter("{%x:%x},", vnode->fid.vid, vnode->fid.vnode); @@ -59,6 +60,12 @@ int afs_open(struct inode *inode, struct file *file) return PTR_ERR(key); } + ret = afs_validate(vnode, key); + if (ret < 0) { + _leave(" = %d [val]", ret); + return ret; + } + file->private_data = key; _leave(" = 0"); return 0; -- cgit v1.2.3