* fish.c (fish_fh_open): Don't retrieve file if it is

opened for writting only.
This commit is contained in:
Andrew V. Samoilov 2002-05-21 10:50:55 +00:00
parent 09bad78c80
commit 2b3c6b8f0b
2 changed files with 9 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2002-05-21 Andrew V. Samoilov <kai@cmail.ru>
* fish.c (fish_fh_open): Don't retrieve file if it is
opened for writting only.
2002-05-17 Andrew V. Samoilov <kai@cmail.ru>
* xdirentry.h (vfs_s_super): Add control_connection_buzy

View File

@ -774,6 +774,10 @@ static int fish_rmdir (vfs *me, char *path)
static int fish_fh_open (vfs *me, vfs_s_fh *fh, int flags, int mode)
{
/* File will be written only, so no need to retrieve it */
if (((flags & O_WRONLY) == O_WRONLY) && !(flags & (O_RDONLY|O_RDWR))){
return 0;
}
if (!fh->ino->localname)
if (vfs_s_retrieve_file (me, fh->ino)==-1)
return -1;