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/volume.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'fs/afs/volume.c') diff --git a/fs/afs/volume.c b/fs/afs/volume.c index 15e13678c21..dd160cada45 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -295,6 +295,7 @@ struct afs_server *afs_volume_pick_fileserver(struct afs_vnode *vnode) * - releases the ref on the server struct that was acquired by picking * - records result of using a particular server to access a volume * - return 0 to try again, 1 if okay or to issue error + * - the caller must release the server struct if result was 0 */ int afs_volume_release_fileserver(struct afs_vnode *vnode, struct afs_server *server, @@ -312,7 +313,8 @@ int afs_volume_release_fileserver(struct afs_vnode *vnode, case 0: server->fs_act_jif = jiffies; server->fs_state = 0; - break; + _leave(""); + return 1; /* the fileserver denied all knowledge of the volume */ case -ENOMEDIUM: @@ -377,14 +379,12 @@ int afs_volume_release_fileserver(struct afs_vnode *vnode, server->fs_act_jif = jiffies; case -ENOMEM: case -ENONET: - break; + /* tell the caller to accept the result */ + afs_put_server(server); + _leave(" [local failure]"); + return 1; } - /* tell the caller to accept the result */ - afs_put_server(server); - _leave(""); - return 1; - /* tell the caller to loop around and try the next server */ try_next_server_upw: up_write(&volume->server_sem); -- cgit v1.2.3