summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:33:52 -0800
committerLinus Torvalds <torvalds@athlon.transmeta.com>2002-02-04 20:33:52 -0800
commit5aa875d2cbee34727963bd81aa992b64480045ca (patch)
tree56e417ffca41ad67797b4354d3e4ab19bd078502 /fs
parent6293d56ca18db9ed322b2a5550ac7b27bd538cff (diff)
v2.4.14.7 -> v2.4.14.8
- Richard Henderson: alpha update - Andrew Morton: fix ext3/minix/sysv fsync behaviour.
Diffstat (limited to 'fs')
-rw-r--r--fs/ext3/fsync.c1
-rw-r--r--fs/fat/inode.c2
-rw-r--r--fs/inode.c4
-rw-r--r--fs/minix/file.c4
-rw-r--r--fs/nfs/write.c2
-rw-r--r--fs/proc/proc_misc.c41
-rw-r--r--fs/sysv/file.c4
-rw-r--r--fs/udf/fsync.c1
8 files changed, 13 insertions, 46 deletions
diff --git a/fs/ext3/fsync.c b/fs/ext3/fsync.c
index 742c4027f791..79f4f838514f 100644
--- a/fs/ext3/fsync.c
+++ b/fs/ext3/fsync.c
@@ -62,6 +62,7 @@ int ext3_sync_file(struct file * file, struct dentry *dentry, int datasync)
* we'll end up waiting on them in commit.
*/
ret = fsync_inode_buffers(inode);
+ ret |= fsync_inode_data_buffers(inode);
ext3_force_commit(inode->i_sb);
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index ad4af48e863a..bba65eff5898 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -123,6 +123,8 @@ struct inode *fat_iget(struct super_block *sb, int i_pos)
if (i->i_location != i_pos)
continue;
inode = igrab(i->i_fat_inode);
+ if (inode)
+ break;
}
spin_unlock(&fat_inode_lock);
return inode;
diff --git a/fs/inode.c b/fs/inode.c
index 60fa00d40e7b..5e2d697efa6c 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -404,6 +404,8 @@ static void try_to_sync_unused_inodes(void * arg)
spin_lock(&sb_lock);
sb = sb_entry(super_blocks.next);
for (; nr_inodes && sb != sb_entry(&super_blocks); sb = sb_entry(sb->s_list.next)) {
+ if (list_empty(&sb->s_dirty))
+ continue;
spin_unlock(&sb_lock);
nr_inodes = try_to_sync_unused_list(&sb->s_dirty, nr_inodes);
spin_lock(&sb_lock);
@@ -957,8 +959,6 @@ struct inode *igrab(struct inode *inode)
*/
inode = NULL;
spin_unlock(&inode_lock);
- if (inode)
- wait_on_inode(inode);
return inode;
}
diff --git a/fs/minix/file.c b/fs/minix/file.c
index d464e68a92bc..ab8682902b26 100644
--- a/fs/minix/file.c
+++ b/fs/minix/file.c
@@ -30,8 +30,10 @@ struct inode_operations minix_file_inode_operations = {
int minix_sync_file(struct file * file, struct dentry *dentry, int datasync)
{
struct inode *inode = dentry->d_inode;
- int err = fsync_inode_buffers(inode);
+ int err;
+ err = fsync_inode_buffers(inode);
+ err |= fsync_inode_data_buffers(inode);
if (!(inode->i_state & I_DIRTY))
return err;
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 7284c054671b..2d7d653924fc 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -314,7 +314,7 @@ nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
if (!NFS_WBACK_BUSY(req))
printk(KERN_ERR "NFS: unlocked request attempted hashed!\n");
if (list_empty(&inode->u.nfs_i.writeback))
- atomic_inc(&inode->i_count);
+ igrab(inode);
inode->u.nfs_i.npages++;
list_add(&req->wb_hash, &inode->u.nfs_i.writeback);
req->wb_count++;
diff --git a/fs/proc/proc_misc.c b/fs/proc/proc_misc.c
index 504232b00ec2..aeca5ec31880 100644
--- a/fs/proc/proc_misc.c
+++ b/fs/proc/proc_misc.c
@@ -50,11 +50,6 @@
* have a way to deal with that gracefully. Right now I used straightforward
* wrappers, but this needs further analysis wrt potential overflows.
*/
-extern int get_hardware_list(char *);
-extern int get_stram_list(char *);
-#ifdef CONFIG_DEBUG_MALLOC
-extern int get_malloc(char * buffer);
-#endif
#ifdef CONFIG_MODULES
extern int get_module_list(char *);
#endif
@@ -219,33 +214,6 @@ static struct file_operations proc_cpuinfo_operations = {
release: seq_release,
};
-#ifdef CONFIG_PROC_HARDWARE
-static int hardware_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = get_hardware_list(page);
- return proc_calc_metrics(page, start, off, count, eof, len);
-}
-#endif
-
-#ifdef CONFIG_STRAM_PROC
-static int stram_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = get_stram_list(page);
- return proc_calc_metrics(page, start, off, count, eof, len);
-}
-#endif
-
-#ifdef CONFIG_DEBUG_MALLOC
-static int malloc_read_proc(char *page, char **start, off_t off,
- int count, int *eof, void *data)
-{
- int len = get_malloc(page);
- return proc_calc_metrics(page, start, off, count, eof, len);
-}
-#endif
-
#ifdef CONFIG_MODULES
static int modules_read_proc(char *page, char **start, off_t off,
int count, int *eof, void *data)
@@ -538,15 +506,6 @@ void __init proc_misc_init(void)
{"uptime", uptime_read_proc},
{"meminfo", meminfo_read_proc},
{"version", version_read_proc},
-#ifdef CONFIG_PROC_HARDWARE
- {"hardware", hardware_read_proc},
-#endif
-#ifdef CONFIG_STRAM_PROC
- {"stram", stram_read_proc},
-#endif
-#ifdef CONFIG_DEBUG_MALLOC
- {"malloc", malloc_read_proc},
-#endif
#ifdef CONFIG_MODULES
{"modules", modules_read_proc},
#endif
diff --git a/fs/sysv/file.c b/fs/sysv/file.c
index b798b4339b6e..ee1ec8bf62e3 100644
--- a/fs/sysv/file.c
+++ b/fs/sysv/file.c
@@ -35,8 +35,10 @@ struct inode_operations sysv_file_inode_operations = {
int sysv_sync_file(struct file * file, struct dentry *dentry, int datasync)
{
struct inode *inode = dentry->d_inode;
- int err = fsync_inode_buffers(inode);
+ int err;
+ err = fsync_inode_buffers(inode);
+ err |= fsync_inode_data_buffers(inode);
if (!(inode->i_state & I_DIRTY))
return err;
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
diff --git a/fs/udf/fsync.c b/fs/udf/fsync.c
index 59a73f0d269e..f302078dfa0f 100644
--- a/fs/udf/fsync.c
+++ b/fs/udf/fsync.c
@@ -45,6 +45,7 @@ int udf_fsync_inode(struct inode *inode, int datasync)
int err;
err = fsync_inode_buffers(inode);
+ err |= fsync_inode_data_buffers(inode);
if (!(inode->i_state & I_DIRTY))
return err;
if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))