From: Russ R. <rus...@gm...> - 2006-07-29 10:59:41
|
Hi, According to the spec: > The remove request asks the file server both to remove the file > represented by fid and to clunk the fid, even if the remove fails. but the Linux client seems to expect the fid to be valid after a failed remove attempt. Specifically, I'm getting this behavior when attempting to remove a non-empty directory. The culprit seems to be this code in vfs_inode.c, lines 428--434 (the line numbers may be a bit off since I'm using a 2.6.15 kernel with a backported 9p driver): result = v9fs_t_remove(v9ses, fid, &fcall); if (result < 0) { PRINT_FCALL_ERROR("remove fails", fcall); } else { v9fs_put_idpool(fid, &v9ses->fidpool); v9fs_fid_destroy(v9fid); } where the v9fs_put_idpool and v9fs_fid_destroy calls should be made regardless of the result from v9fs_t_remove. Presumably, server code that relies on this should be adjusted as well. Since I'm not too familiar with this code I wanted to check if I'm missing anything before patching this. - Russ |