git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
fs
/
reiserfs
/
file.c
diff --git
a/fs/reiserfs/file.c
b/fs/reiserfs/file.c
index
4127ad1
..
db38c09
100644
(file)
--- a/
fs/reiserfs/file.c
+++ b/
fs/reiserfs/file.c
@@
-48,8
+48,8
@@
static int reiserfs_file_release(struct inode *inode, struct file *filp)
return 0;
}
return 0;
}
- mutex_lock(&inode->i_mutex);
reiserfs_write_lock(inode->i_sb);
reiserfs_write_lock(inode->i_sb);
+ mutex_lock(&inode->i_mutex);
/* freeing preallocation only involves relogging blocks that
* are already in the current transaction. preallocation gets
* freed at the end of each transaction, so it is impossible for
/* freeing preallocation only involves relogging blocks that
* are already in the current transaction. preallocation gets
* freed at the end of each transaction, so it is impossible for
@@
-860,12
+860,8
@@
static int reiserfs_submit_file_region_for_write(struct reiserfs_transaction_han
// this sets the proper flags for O_SYNC to trigger a commit
mark_inode_dirty(inode);
reiserfs_write_unlock(inode->i_sb);
// this sets the proper flags for O_SYNC to trigger a commit
mark_inode_dirty(inode);
reiserfs_write_unlock(inode->i_sb);
- } else {
- reiserfs_write_lock(inode->i_sb);
- reiserfs_update_inode_transaction(inode);
+ } else
mark_inode_dirty(inode);
mark_inode_dirty(inode);
- reiserfs_write_unlock(inode->i_sb);
- }
sd_update = 1;
}
sd_update = 1;
}
@@
-1536,7
+1532,7
@@
static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
buf += write_bytes;
*ppos = pos += write_bytes;
count -= write_bytes;
buf += write_bytes;
*ppos = pos += write_bytes;
count -= write_bytes;
- balance_dirty_pages_ratelimited
_nr(inode->i_mapping, num_pages
);
+ balance_dirty_pages_ratelimited
(inode->i_mapping
);
}
/* this is only true on error */
}
/* this is only true on error */
@@
-1550,10
+1546,10
@@
static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
}
}
}
}
- if (
likely(res >= 0) &&
- (unlikely((file->f_flags & O_SYNC) || IS_SYNC(inode))))
-
res =
generic_osync_inode(inode, file->f_mapping,
-
OSYNC_METADATA | OSYNC_DATA);
+ if (
(file->f_flags & O_SYNC) || IS_SYNC(inode))
+ res =
+
generic_osync_inode(inode, file->f_mapping,
+ OSYNC_METADATA | OSYNC_DATA);
mutex_unlock(&inode->i_mutex);
reiserfs_async_progress_wait(inode->i_sb);
mutex_unlock(&inode->i_mutex);
reiserfs_async_progress_wait(inode->i_sb);
@@
-1564,7
+1560,13
@@
static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
return res;
}
return res;
}
-const struct file_operations reiserfs_file_operations = {
+static ssize_t reiserfs_aio_write(struct kiocb *iocb, const char __user * buf,
+ size_t count, loff_t pos)
+{
+ return generic_file_aio_write(iocb, buf, count, pos);
+}
+
+struct file_operations reiserfs_file_operations = {
.read = generic_file_read,
.write = reiserfs_file_write,
.ioctl = reiserfs_ioctl,
.read = generic_file_read,
.write = reiserfs_file_write,
.ioctl = reiserfs_ioctl,
@@
-1573,9
+1575,7
@@
const struct file_operations reiserfs_file_operations = {
.fsync = reiserfs_sync_file,
.sendfile = generic_file_sendfile,
.aio_read = generic_file_aio_read,
.fsync = reiserfs_sync_file,
.sendfile = generic_file_sendfile,
.aio_read = generic_file_aio_read,
- .aio_write = generic_file_aio_write,
- .splice_read = generic_file_splice_read,
- .splice_write = generic_file_splice_write,
+ .aio_write = reiserfs_aio_write,
};
struct inode_operations reiserfs_file_inode_operations = {
};
struct inode_operations reiserfs_file_inode_operations = {