aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/file.c
diff options
context:
space:
mode:
authorMingming Cao <cmm@us.ibm.com>2006-10-11 04:20:53 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-11 14:14:15 -0400
commit617ba13b31fbf505cc21799826639ef24ed94af0 (patch)
tree2a41e8c993f7c1eed115ad24047d546ba56cbdf5 /fs/ext4/file.c
parentac27a0ec112a089f1a5102bc8dffc79c8c815571 (diff)
[PATCH] ext4: rename ext4 symbols to avoid duplication of ext3 symbols
Mingming Cao originally did this work, and Shaggy reproduced it using some scripts from her. Signed-off-by: Mingming Cao <cmm@us.ibm.com> Signed-off-by: Dave Kleikamp <shaggy@austin.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r--fs/ext4/file.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c
index e96c388047e0..d938fbe1e08b 100644
--- a/fs/ext4/file.c
+++ b/fs/ext4/file.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * linux/fs/ext3/file.c 2 * linux/fs/ext4/file.c
3 * 3 *
4 * Copyright (C) 1992, 1993, 1994, 1995 4 * Copyright (C) 1992, 1993, 1994, 1995
5 * Remy Card (card@masi.ibp.fr) 5 * Remy Card (card@masi.ibp.fr)
@@ -12,7 +12,7 @@
12 * 12 *
13 * Copyright (C) 1991, 1992 Linus Torvalds 13 * Copyright (C) 1991, 1992 Linus Torvalds
14 * 14 *
15 * ext3 fs regular file handling primitives 15 * ext4 fs regular file handling primitives
16 * 16 *
17 * 64-bit file support on 64-bit platforms by Jakub Jelinek 17 * 64-bit file support on 64-bit platforms by Jakub Jelinek
18 * (jj@sunsite.ms.mff.cuni.cz) 18 * (jj@sunsite.ms.mff.cuni.cz)
@@ -21,34 +21,34 @@
21#include <linux/time.h> 21#include <linux/time.h>
22#include <linux/fs.h> 22#include <linux/fs.h>
23#include <linux/jbd.h> 23#include <linux/jbd.h>
24#include <linux/ext3_fs.h> 24#include <linux/ext4_fs.h>
25#include <linux/ext3_jbd.h> 25#include <linux/ext4_jbd.h>
26#include "xattr.h" 26#include "xattr.h"
27#include "acl.h" 27#include "acl.h"
28 28
29/* 29/*
30 * Called when an inode is released. Note that this is different 30 * Called when an inode is released. Note that this is different
31 * from ext3_file_open: open gets called at every open, but release 31 * from ext4_file_open: open gets called at every open, but release
32 * gets called only when /all/ the files are closed. 32 * gets called only when /all/ the files are closed.
33 */ 33 */
34static int ext3_release_file (struct inode * inode, struct file * filp) 34static int ext4_release_file (struct inode * inode, struct file * filp)
35{ 35{
36 /* if we are the last writer on the inode, drop the block reservation */ 36 /* if we are the last writer on the inode, drop the block reservation */
37 if ((filp->f_mode & FMODE_WRITE) && 37 if ((filp->f_mode & FMODE_WRITE) &&
38 (atomic_read(&inode->i_writecount) == 1)) 38 (atomic_read(&inode->i_writecount) == 1))
39 { 39 {
40 mutex_lock(&EXT3_I(inode)->truncate_mutex); 40 mutex_lock(&EXT4_I(inode)->truncate_mutex);
41 ext3_discard_reservation(inode); 41 ext4_discard_reservation(inode);
42 mutex_unlock(&EXT3_I(inode)->truncate_mutex); 42 mutex_unlock(&EXT4_I(inode)->truncate_mutex);
43 } 43 }
44 if (is_dx(inode) && filp->private_data) 44 if (is_dx(inode) && filp->private_data)
45 ext3_htree_free_dir_info(filp->private_data); 45 ext4_htree_free_dir_info(filp->private_data);
46 46
47 return 0; 47 return 0;
48} 48}
49 49
50static ssize_t 50static ssize_t
51ext3_file_write(struct kiocb *iocb, const struct iovec *iov, 51ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
52 unsigned long nr_segs, loff_t pos) 52 unsigned long nr_segs, loff_t pos)
53{ 53{
54 struct file *file = iocb->ki_filp; 54 struct file *file = iocb->ki_filp;
@@ -79,7 +79,7 @@ ext3_file_write(struct kiocb *iocb, const struct iovec *iov,
79 * Open question --- do we care about flushing timestamps too 79 * Open question --- do we care about flushing timestamps too
80 * if the inode is IS_SYNC? 80 * if the inode is IS_SYNC?
81 */ 81 */
82 if (!ext3_should_journal_data(inode)) 82 if (!ext4_should_journal_data(inode))
83 return ret; 83 return ret;
84 84
85 goto force_commit; 85 goto force_commit;
@@ -100,40 +100,40 @@ ext3_file_write(struct kiocb *iocb, const struct iovec *iov,
100 */ 100 */
101 101
102force_commit: 102force_commit:
103 err = ext3_force_commit(inode->i_sb); 103 err = ext4_force_commit(inode->i_sb);
104 if (err) 104 if (err)
105 return err; 105 return err;
106 return ret; 106 return ret;
107} 107}
108 108
109const struct file_operations ext3_file_operations = { 109const struct file_operations ext4_file_operations = {
110 .llseek = generic_file_llseek, 110 .llseek = generic_file_llseek,
111 .read = do_sync_read, 111 .read = do_sync_read,
112 .write = do_sync_write, 112 .write = do_sync_write,
113 .aio_read = generic_file_aio_read, 113 .aio_read = generic_file_aio_read,
114 .aio_write = ext3_file_write, 114 .aio_write = ext4_file_write,
115 .ioctl = ext3_ioctl, 115 .ioctl = ext4_ioctl,
116#ifdef CONFIG_COMPAT 116#ifdef CONFIG_COMPAT
117 .compat_ioctl = ext3_compat_ioctl, 117 .compat_ioctl = ext4_compat_ioctl,
118#endif 118#endif
119 .mmap = generic_file_mmap, 119 .mmap = generic_file_mmap,
120 .open = generic_file_open, 120 .open = generic_file_open,
121 .release = ext3_release_file, 121 .release = ext4_release_file,
122 .fsync = ext3_sync_file, 122 .fsync = ext4_sync_file,
123 .sendfile = generic_file_sendfile, 123 .sendfile = generic_file_sendfile,
124 .splice_read = generic_file_splice_read, 124 .splice_read = generic_file_splice_read,
125 .splice_write = generic_file_splice_write, 125 .splice_write = generic_file_splice_write,
126}; 126};
127 127
128struct inode_operations ext3_file_inode_operations = { 128struct inode_operations ext4_file_inode_operations = {
129 .truncate = ext3_truncate, 129 .truncate = ext4_truncate,
130 .setattr = ext3_setattr, 130 .setattr = ext4_setattr,
131#ifdef CONFIG_EXT3_FS_XATTR 131#ifdef CONFIG_EXT4DEV_FS_XATTR
132 .setxattr = generic_setxattr, 132 .setxattr = generic_setxattr,
133 .getxattr = generic_getxattr, 133 .getxattr = generic_getxattr,
134 .listxattr = ext3_listxattr, 134 .listxattr = ext4_listxattr,
135 .removexattr = generic_removexattr, 135 .removexattr = generic_removexattr,
136#endif 136#endif
137 .permission = ext3_permission, 137 .permission = ext4_permission,
138}; 138};
139 139