diff options
Diffstat (limited to 'fs/reiserfs/file.c')
-rw-r--r-- | fs/reiserfs/file.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 33408417038c..9f436668b7f8 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -20,14 +20,14 @@ | |||
20 | ** insertion/balancing, for files that are written in one write. | 20 | ** insertion/balancing, for files that are written in one write. |
21 | ** It avoids unnecessary tail packings (balances) for files that are written in | 21 | ** It avoids unnecessary tail packings (balances) for files that are written in |
22 | ** multiple writes and are small enough to have tails. | 22 | ** multiple writes and are small enough to have tails. |
23 | ** | 23 | ** |
24 | ** file_release is called by the VFS layer when the file is closed. If | 24 | ** file_release is called by the VFS layer when the file is closed. If |
25 | ** this is the last open file descriptor, and the file | 25 | ** this is the last open file descriptor, and the file |
26 | ** small enough to have a tail, and the tail is currently in an | 26 | ** small enough to have a tail, and the tail is currently in an |
27 | ** unformatted node, the tail is converted back into a direct item. | 27 | ** unformatted node, the tail is converted back into a direct item. |
28 | ** | 28 | ** |
29 | ** We use reiserfs_truncate_file to pack the tail, since it already has | 29 | ** We use reiserfs_truncate_file to pack the tail, since it already has |
30 | ** all the conditions coded. | 30 | ** all the conditions coded. |
31 | */ | 31 | */ |
32 | static int reiserfs_file_release(struct inode *inode, struct file *filp) | 32 | static int reiserfs_file_release(struct inode *inode, struct file *filp) |
33 | { | 33 | { |
@@ -76,7 +76,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
76 | * and let the admin know what is going on. | 76 | * and let the admin know what is going on. |
77 | */ | 77 | */ |
78 | igrab(inode); | 78 | igrab(inode); |
79 | reiserfs_warning(inode->i_sb, | 79 | reiserfs_warning(inode->i_sb, "clm-9001", |
80 | "pinning inode %lu because the " | 80 | "pinning inode %lu because the " |
81 | "preallocation can't be freed", | 81 | "preallocation can't be freed", |
82 | inode->i_ino); | 82 | inode->i_ino); |
@@ -134,23 +134,23 @@ static void reiserfs_vfs_truncate_file(struct inode *inode) | |||
134 | * be removed... | 134 | * be removed... |
135 | */ | 135 | */ |
136 | 136 | ||
137 | static int reiserfs_sync_file(struct file *p_s_filp, | 137 | static int reiserfs_sync_file(struct file *filp, |
138 | struct dentry *p_s_dentry, int datasync) | 138 | struct dentry *dentry, int datasync) |
139 | { | 139 | { |
140 | struct inode *p_s_inode = p_s_dentry->d_inode; | 140 | struct inode *inode = dentry->d_inode; |
141 | int n_err; | 141 | int err; |
142 | int barrier_done; | 142 | int barrier_done; |
143 | 143 | ||
144 | BUG_ON(!S_ISREG(p_s_inode->i_mode)); | 144 | BUG_ON(!S_ISREG(inode->i_mode)); |
145 | n_err = sync_mapping_buffers(p_s_inode->i_mapping); | 145 | err = sync_mapping_buffers(inode->i_mapping); |
146 | reiserfs_write_lock(p_s_inode->i_sb); | 146 | reiserfs_write_lock(inode->i_sb); |
147 | barrier_done = reiserfs_commit_for_inode(p_s_inode); | 147 | barrier_done = reiserfs_commit_for_inode(inode); |
148 | reiserfs_write_unlock(p_s_inode->i_sb); | 148 | reiserfs_write_unlock(inode->i_sb); |
149 | if (barrier_done != 1 && reiserfs_barrier_flush(p_s_inode->i_sb)) | 149 | if (barrier_done != 1 && reiserfs_barrier_flush(inode->i_sb)) |
150 | blkdev_issue_flush(p_s_inode->i_sb->s_bdev, NULL); | 150 | blkdev_issue_flush(inode->i_sb->s_bdev, NULL); |
151 | if (barrier_done < 0) | 151 | if (barrier_done < 0) |
152 | return barrier_done; | 152 | return barrier_done; |
153 | return (n_err < 0) ? -EIO : 0; | 153 | return (err < 0) ? -EIO : 0; |
154 | } | 154 | } |
155 | 155 | ||
156 | /* taken fs/buffer.c:__block_commit_write */ | 156 | /* taken fs/buffer.c:__block_commit_write */ |
@@ -223,7 +223,7 @@ int reiserfs_commit_page(struct inode *inode, struct page *page, | |||
223 | } | 223 | } |
224 | 224 | ||
225 | /* Write @count bytes at position @ppos in a file indicated by @file | 225 | /* Write @count bytes at position @ppos in a file indicated by @file |
226 | from the buffer @buf. | 226 | from the buffer @buf. |
227 | 227 | ||
228 | generic_file_write() is only appropriate for filesystems that are not seeking to optimize performance and want | 228 | generic_file_write() is only appropriate for filesystems that are not seeking to optimize performance and want |
229 | something simple that works. It is not for serious use by general purpose filesystems, excepting the one that it was | 229 | something simple that works. It is not for serious use by general purpose filesystems, excepting the one that it was |