lkml.org 
[lkml]   [1999]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject2.2.1: fs/buffer.c::fdatasync patch
The following patch implements a semaphore in fsync() that should also
have been propogated to the (identical) fdatasync() function; perhaps
fdatasync() should just call fsync() until fdatasync() is properly
implemented on its own... anyway, here's the fix.


Chris
--
=============================================================================
| Chris Lawrence | You have a computer. Do you have Linux? |
| <quango@watervalley.net> | http://www.linux-m68k.org/index.html |
| | |
| Amiga A4000/060 with | Visit the Amiga Web Directory |
| Linux/m68k 2.1.127 | http://www.cucug.org/amiga.html |
=============================================================================

--- linux-2.2.1/fs/buffer.c Fri Jan 22 22:32:04 1999
+++ linux/fs/buffer.c Tue Feb 16 00:16:32 1999
@@ -382,8 +382,11 @@
if (!file->f_op || !file->f_op->fsync)
goto out_putf;

+ /* We need to protect against concurrent writers.. */
+ down(&inode->i_sem);
/* this needs further work, at the moment it is identical to fsync() */
err = file->f_op->fsync(file, dentry);
+ up(&inode->i_sem);

out_putf:
fput(file);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:50    [W:0.020 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site