Re: syslog spiral death

Andries.Brouwer@cwi.nl
Mon, 4 Nov 1996 02:22:55 +0100


: No it doesn't! Linux's fsync() only falls back on doing a
: whole-device sync if it is used on a file whose filesystem doesn't
: provide its own specific fsync code.

>From a random kernel source:

asmlinkage int sys_fsync(unsigned int fd)
{
struct file * file;
struct inode * inode;

if (fd>=NR_OPEN || !(file=current->files->fd[fd]) || !(inode=file->f_inode))
return -EBADF;
if (!file->f_op || !file->f_op->fsync)
return -EINVAL;
if (file->f_op->fsync(inode,file))
return -EIO;
return 0;
}