diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/Kconfig | 6 | ||||
-rw-r--r-- | fs/reiserfs/README | 2 | ||||
-rw-r--r-- | fs/reiserfs/file.c | 3 | ||||
-rw-r--r-- | fs/reiserfs/inode.c | 26 | ||||
-rw-r--r-- | fs/reiserfs/ioctl.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 106 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 9 | ||||
-rw-r--r-- | fs/reiserfs/xattr.c | 7 |
9 files changed, 47 insertions, 120 deletions
diff --git a/fs/reiserfs/Kconfig b/fs/reiserfs/Kconfig index 513f431038f9..7cd46666ba2c 100644 --- a/fs/reiserfs/Kconfig +++ b/fs/reiserfs/Kconfig | |||
@@ -10,7 +10,8 @@ config REISERFS_FS | |||
10 | 10 | ||
11 | In general, ReiserFS is as fast as ext2, but is very efficient with | 11 | In general, ReiserFS is as fast as ext2, but is very efficient with |
12 | large directories and small files. Additional patches are needed | 12 | large directories and small files. Additional patches are needed |
13 | for NFS and quotas, please see <http://www.namesys.com/> for links. | 13 | for NFS and quotas, please see |
14 | <https://reiser4.wiki.kernel.org/index.php/Main_Page> for links. | ||
14 | 15 | ||
15 | It is more easily extended to have features currently found in | 16 | It is more easily extended to have features currently found in |
16 | database and keyword search systems than block allocation based file | 17 | database and keyword search systems than block allocation based file |
@@ -18,7 +19,8 @@ config REISERFS_FS | |||
18 | plugins consistent with our motto ``It takes more than a license to | 19 | plugins consistent with our motto ``It takes more than a license to |
19 | make source code open.'' | 20 | make source code open.'' |
20 | 21 | ||
21 | Read <http://www.namesys.com/> to learn more about reiserfs. | 22 | Read <https://reiser4.wiki.kernel.org/index.php/Main_Page> |
23 | to learn more about reiserfs. | ||
22 | 24 | ||
23 | Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com. | 25 | Sponsored by Threshold Networks, Emusic.com, and Bigstorage.com. |
24 | 26 | ||
diff --git a/fs/reiserfs/README b/fs/reiserfs/README index 14e8c9d460e5..e2f7a264e3ff 100644 --- a/fs/reiserfs/README +++ b/fs/reiserfs/README | |||
@@ -43,7 +43,7 @@ to address the fair crediting issue in the next GPL version.) | |||
43 | [END LICENSING] | 43 | [END LICENSING] |
44 | 44 | ||
45 | Reiserfs is a file system based on balanced tree algorithms, which is | 45 | Reiserfs is a file system based on balanced tree algorithms, which is |
46 | described at http://devlinux.com/namesys. | 46 | described at https://reiser4.wiki.kernel.org/index.php/Main_Page |
47 | 47 | ||
48 | Stop reading here. Go there, then return. | 48 | Stop reading here. Go there, then return. |
49 | 49 | ||
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 6846371498b6..91f080cc76c8 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -152,8 +152,7 @@ static int reiserfs_sync_file(struct file *filp, int datasync) | |||
152 | barrier_done = reiserfs_commit_for_inode(inode); | 152 | barrier_done = reiserfs_commit_for_inode(inode); |
153 | reiserfs_write_unlock(inode->i_sb); | 153 | reiserfs_write_unlock(inode->i_sb); |
154 | if (barrier_done != 1 && reiserfs_barrier_flush(inode->i_sb)) | 154 | if (barrier_done != 1 && reiserfs_barrier_flush(inode->i_sb)) |
155 | blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL, | 155 | blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL); |
156 | BLKDEV_IFL_WAIT); | ||
157 | if (barrier_done < 0) | 156 | if (barrier_done < 0) |
158 | return barrier_done; | 157 | return barrier_done; |
159 | return (err < 0) ? -EIO : 0; | 158 | return (err < 0) ? -EIO : 0; |
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index caa758377d66..41656d40dc5c 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -22,8 +22,6 @@ | |||
22 | 22 | ||
23 | int reiserfs_commit_write(struct file *f, struct page *page, | 23 | int reiserfs_commit_write(struct file *f, struct page *page, |
24 | unsigned from, unsigned to); | 24 | unsigned from, unsigned to); |
25 | int reiserfs_prepare_write(struct file *f, struct page *page, | ||
26 | unsigned from, unsigned to); | ||
27 | 25 | ||
28 | void reiserfs_evict_inode(struct inode *inode) | 26 | void reiserfs_evict_inode(struct inode *inode) |
29 | { | 27 | { |
@@ -165,7 +163,7 @@ inline void make_le_item_head(struct item_head *ih, const struct cpu_key *key, | |||
165 | ** but tail is still sitting in a direct item, and we can't write to | 163 | ** but tail is still sitting in a direct item, and we can't write to |
166 | ** it. So, look through this page, and check all the mapped buffers | 164 | ** it. So, look through this page, and check all the mapped buffers |
167 | ** to make sure they have valid block numbers. Any that don't need | 165 | ** to make sure they have valid block numbers. Any that don't need |
168 | ** to be unmapped, so that block_prepare_write will correctly call | 166 | ** to be unmapped, so that __block_write_begin will correctly call |
169 | ** reiserfs_get_block to convert the tail into an unformatted node | 167 | ** reiserfs_get_block to convert the tail into an unformatted node |
170 | */ | 168 | */ |
171 | static inline void fix_tail_page_for_writing(struct page *page) | 169 | static inline void fix_tail_page_for_writing(struct page *page) |
@@ -439,13 +437,13 @@ static int reiserfs_bmap(struct inode *inode, sector_t block, | |||
439 | } | 437 | } |
440 | 438 | ||
441 | /* special version of get_block that is only used by grab_tail_page right | 439 | /* special version of get_block that is only used by grab_tail_page right |
442 | ** now. It is sent to block_prepare_write, and when you try to get a | 440 | ** now. It is sent to __block_write_begin, and when you try to get a |
443 | ** block past the end of the file (or a block from a hole) it returns | 441 | ** block past the end of the file (or a block from a hole) it returns |
444 | ** -ENOENT instead of a valid buffer. block_prepare_write expects to | 442 | ** -ENOENT instead of a valid buffer. __block_write_begin expects to |
445 | ** be able to do i/o on the buffers returned, unless an error value | 443 | ** be able to do i/o on the buffers returned, unless an error value |
446 | ** is also returned. | 444 | ** is also returned. |
447 | ** | 445 | ** |
448 | ** So, this allows block_prepare_write to be used for reading a single block | 446 | ** So, this allows __block_write_begin to be used for reading a single block |
449 | ** in a page. Where it does not produce a valid page for holes, or past the | 447 | ** in a page. Where it does not produce a valid page for holes, or past the |
450 | ** end of the file. This turns out to be exactly what we need for reading | 448 | ** end of the file. This turns out to be exactly what we need for reading |
451 | ** tails for conversion. | 449 | ** tails for conversion. |
@@ -558,11 +556,12 @@ static int convert_tail_for_hole(struct inode *inode, | |||
558 | ** | 556 | ** |
559 | ** We must fix the tail page for writing because it might have buffers | 557 | ** We must fix the tail page for writing because it might have buffers |
560 | ** that are mapped, but have a block number of 0. This indicates tail | 558 | ** that are mapped, but have a block number of 0. This indicates tail |
561 | ** data that has been read directly into the page, and block_prepare_write | 559 | ** data that has been read directly into the page, and |
562 | ** won't trigger a get_block in this case. | 560 | ** __block_write_begin won't trigger a get_block in this case. |
563 | */ | 561 | */ |
564 | fix_tail_page_for_writing(tail_page); | 562 | fix_tail_page_for_writing(tail_page); |
565 | retval = reiserfs_prepare_write(NULL, tail_page, tail_start, tail_end); | 563 | retval = __reiserfs_write_begin(tail_page, tail_start, |
564 | tail_end - tail_start); | ||
566 | if (retval) | 565 | if (retval) |
567 | goto unlock; | 566 | goto unlock; |
568 | 567 | ||
@@ -2033,7 +2032,7 @@ static int grab_tail_page(struct inode *inode, | |||
2033 | /* start within the page of the last block in the file */ | 2032 | /* start within the page of the last block in the file */ |
2034 | start = (offset / blocksize) * blocksize; | 2033 | start = (offset / blocksize) * blocksize; |
2035 | 2034 | ||
2036 | error = block_prepare_write(page, start, offset, | 2035 | error = __block_write_begin(page, start, offset - start, |
2037 | reiserfs_get_block_create_0); | 2036 | reiserfs_get_block_create_0); |
2038 | if (error) | 2037 | if (error) |
2039 | goto unlock; | 2038 | goto unlock; |
@@ -2438,7 +2437,7 @@ static int reiserfs_write_full_page(struct page *page, | |||
2438 | /* from this point on, we know the buffer is mapped to a | 2437 | /* from this point on, we know the buffer is mapped to a |
2439 | * real block and not a direct item | 2438 | * real block and not a direct item |
2440 | */ | 2439 | */ |
2441 | if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { | 2440 | if (wbc->sync_mode != WB_SYNC_NONE) { |
2442 | lock_buffer(bh); | 2441 | lock_buffer(bh); |
2443 | } else { | 2442 | } else { |
2444 | if (!trylock_buffer(bh)) { | 2443 | if (!trylock_buffer(bh)) { |
@@ -2628,8 +2627,7 @@ static int reiserfs_write_begin(struct file *file, | |||
2628 | return ret; | 2627 | return ret; |
2629 | } | 2628 | } |
2630 | 2629 | ||
2631 | int reiserfs_prepare_write(struct file *f, struct page *page, | 2630 | int __reiserfs_write_begin(struct page *page, unsigned from, unsigned len) |
2632 | unsigned from, unsigned to) | ||
2633 | { | 2631 | { |
2634 | struct inode *inode = page->mapping->host; | 2632 | struct inode *inode = page->mapping->host; |
2635 | int ret; | 2633 | int ret; |
@@ -2650,7 +2648,7 @@ int reiserfs_prepare_write(struct file *f, struct page *page, | |||
2650 | th->t_refcount++; | 2648 | th->t_refcount++; |
2651 | } | 2649 | } |
2652 | 2650 | ||
2653 | ret = block_prepare_write(page, from, to, reiserfs_get_block); | 2651 | ret = __block_write_begin(page, from, len, reiserfs_get_block); |
2654 | if (ret && reiserfs_transaction_running(inode->i_sb)) { | 2652 | if (ret && reiserfs_transaction_running(inode->i_sb)) { |
2655 | struct reiserfs_transaction_handle *th = current->journal_info; | 2653 | struct reiserfs_transaction_handle *th = current->journal_info; |
2656 | /* this gets a little ugly. If reiserfs_get_block returned an | 2654 | /* this gets a little ugly. If reiserfs_get_block returned an |
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index 5cbb81e134ac..adf22b485cea 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -160,8 +160,6 @@ long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, | |||
160 | 160 | ||
161 | int reiserfs_commit_write(struct file *f, struct page *page, | 161 | int reiserfs_commit_write(struct file *f, struct page *page, |
162 | unsigned from, unsigned to); | 162 | unsigned from, unsigned to); |
163 | int reiserfs_prepare_write(struct file *f, struct page *page, | ||
164 | unsigned from, unsigned to); | ||
165 | /* | 163 | /* |
166 | ** reiserfs_unpack | 164 | ** reiserfs_unpack |
167 | ** Function try to convert tail from direct item into indirect. | 165 | ** Function try to convert tail from direct item into indirect. |
@@ -200,7 +198,7 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
200 | } | 198 | } |
201 | 199 | ||
202 | /* we unpack by finding the page with the tail, and calling | 200 | /* we unpack by finding the page with the tail, and calling |
203 | ** reiserfs_prepare_write on that page. This will force a | 201 | ** __reiserfs_write_begin on that page. This will force a |
204 | ** reiserfs_get_block to unpack the tail for us. | 202 | ** reiserfs_get_block to unpack the tail for us. |
205 | */ | 203 | */ |
206 | index = inode->i_size >> PAGE_CACHE_SHIFT; | 204 | index = inode->i_size >> PAGE_CACHE_SHIFT; |
@@ -210,7 +208,7 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
210 | if (!page) { | 208 | if (!page) { |
211 | goto out; | 209 | goto out; |
212 | } | 210 | } |
213 | retval = reiserfs_prepare_write(NULL, page, write_from, write_from); | 211 | retval = __reiserfs_write_begin(page, write_from, 0); |
214 | if (retval) | 212 | if (retval) |
215 | goto out_unlock; | 213 | goto out_unlock; |
216 | 214 | ||
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 812e2c05aa29..076c8b194682 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -138,13 +138,6 @@ static int reiserfs_clean_and_file_buffer(struct buffer_head *bh) | |||
138 | return 0; | 138 | return 0; |
139 | } | 139 | } |
140 | 140 | ||
141 | static void disable_barrier(struct super_block *s) | ||
142 | { | ||
143 | REISERFS_SB(s)->s_mount_opt &= ~(1 << REISERFS_BARRIER_FLUSH); | ||
144 | printk("reiserfs: disabling flush barriers on %s\n", | ||
145 | reiserfs_bdevname(s)); | ||
146 | } | ||
147 | |||
148 | static struct reiserfs_bitmap_node *allocate_bitmap_node(struct super_block | 141 | static struct reiserfs_bitmap_node *allocate_bitmap_node(struct super_block |
149 | *sb) | 142 | *sb) |
150 | { | 143 | { |
@@ -677,30 +670,6 @@ static void submit_ordered_buffer(struct buffer_head *bh) | |||
677 | submit_bh(WRITE, bh); | 670 | submit_bh(WRITE, bh); |
678 | } | 671 | } |
679 | 672 | ||
680 | static int submit_barrier_buffer(struct buffer_head *bh) | ||
681 | { | ||
682 | get_bh(bh); | ||
683 | bh->b_end_io = reiserfs_end_ordered_io; | ||
684 | clear_buffer_dirty(bh); | ||
685 | if (!buffer_uptodate(bh)) | ||
686 | BUG(); | ||
687 | return submit_bh(WRITE_BARRIER, bh); | ||
688 | } | ||
689 | |||
690 | static void check_barrier_completion(struct super_block *s, | ||
691 | struct buffer_head *bh) | ||
692 | { | ||
693 | if (buffer_eopnotsupp(bh)) { | ||
694 | clear_buffer_eopnotsupp(bh); | ||
695 | disable_barrier(s); | ||
696 | set_buffer_uptodate(bh); | ||
697 | set_buffer_dirty(bh); | ||
698 | reiserfs_write_unlock(s); | ||
699 | sync_dirty_buffer(bh); | ||
700 | reiserfs_write_lock(s); | ||
701 | } | ||
702 | } | ||
703 | |||
704 | #define CHUNK_SIZE 32 | 673 | #define CHUNK_SIZE 32 |
705 | struct buffer_chunk { | 674 | struct buffer_chunk { |
706 | struct buffer_head *bh[CHUNK_SIZE]; | 675 | struct buffer_head *bh[CHUNK_SIZE]; |
@@ -1009,7 +978,6 @@ static int flush_commit_list(struct super_block *s, | |||
1009 | struct buffer_head *tbh = NULL; | 978 | struct buffer_head *tbh = NULL; |
1010 | unsigned int trans_id = jl->j_trans_id; | 979 | unsigned int trans_id = jl->j_trans_id; |
1011 | struct reiserfs_journal *journal = SB_JOURNAL(s); | 980 | struct reiserfs_journal *journal = SB_JOURNAL(s); |
1012 | int barrier = 0; | ||
1013 | int retval = 0; | 981 | int retval = 0; |
1014 | int write_len; | 982 | int write_len; |
1015 | 983 | ||
@@ -1094,24 +1062,6 @@ static int flush_commit_list(struct super_block *s, | |||
1094 | } | 1062 | } |
1095 | atomic_dec(&journal->j_async_throttle); | 1063 | atomic_dec(&journal->j_async_throttle); |
1096 | 1064 | ||
1097 | /* We're skipping the commit if there's an error */ | ||
1098 | if (retval || reiserfs_is_journal_aborted(journal)) | ||
1099 | barrier = 0; | ||
1100 | |||
1101 | /* wait on everything written so far before writing the commit | ||
1102 | * if we are in barrier mode, send the commit down now | ||
1103 | */ | ||
1104 | barrier = reiserfs_barrier_flush(s); | ||
1105 | if (barrier) { | ||
1106 | int ret; | ||
1107 | lock_buffer(jl->j_commit_bh); | ||
1108 | ret = submit_barrier_buffer(jl->j_commit_bh); | ||
1109 | if (ret == -EOPNOTSUPP) { | ||
1110 | set_buffer_uptodate(jl->j_commit_bh); | ||
1111 | disable_barrier(s); | ||
1112 | barrier = 0; | ||
1113 | } | ||
1114 | } | ||
1115 | for (i = 0; i < (jl->j_len + 1); i++) { | 1065 | for (i = 0; i < (jl->j_len + 1); i++) { |
1116 | bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + | 1066 | bn = SB_ONDISK_JOURNAL_1st_BLOCK(s) + |
1117 | (jl->j_start + i) % SB_ONDISK_JOURNAL_SIZE(s); | 1067 | (jl->j_start + i) % SB_ONDISK_JOURNAL_SIZE(s); |
@@ -1143,27 +1093,22 @@ static int flush_commit_list(struct super_block *s, | |||
1143 | 1093 | ||
1144 | BUG_ON(atomic_read(&(jl->j_commit_left)) != 1); | 1094 | BUG_ON(atomic_read(&(jl->j_commit_left)) != 1); |
1145 | 1095 | ||
1146 | if (!barrier) { | 1096 | /* If there was a write error in the journal - we can't commit |
1147 | /* If there was a write error in the journal - we can't commit | 1097 | * this transaction - it will be invalid and, if successful, |
1148 | * this transaction - it will be invalid and, if successful, | 1098 | * will just end up propagating the write error out to |
1149 | * will just end up propagating the write error out to | 1099 | * the file system. */ |
1150 | * the file system. */ | 1100 | if (likely(!retval && !reiserfs_is_journal_aborted (journal))) { |
1151 | if (likely(!retval && !reiserfs_is_journal_aborted (journal))) { | 1101 | if (buffer_dirty(jl->j_commit_bh)) |
1152 | if (buffer_dirty(jl->j_commit_bh)) | 1102 | BUG(); |
1153 | BUG(); | 1103 | mark_buffer_dirty(jl->j_commit_bh) ; |
1154 | mark_buffer_dirty(jl->j_commit_bh) ; | ||
1155 | reiserfs_write_unlock(s); | ||
1156 | sync_dirty_buffer(jl->j_commit_bh) ; | ||
1157 | reiserfs_write_lock(s); | ||
1158 | } | ||
1159 | } else { | ||
1160 | reiserfs_write_unlock(s); | 1104 | reiserfs_write_unlock(s); |
1161 | wait_on_buffer(jl->j_commit_bh); | 1105 | if (reiserfs_barrier_flush(s)) |
1106 | __sync_dirty_buffer(jl->j_commit_bh, WRITE_FLUSH_FUA); | ||
1107 | else | ||
1108 | sync_dirty_buffer(jl->j_commit_bh); | ||
1162 | reiserfs_write_lock(s); | 1109 | reiserfs_write_lock(s); |
1163 | } | 1110 | } |
1164 | 1111 | ||
1165 | check_barrier_completion(s, jl->j_commit_bh); | ||
1166 | |||
1167 | /* If there was a write error in the journal - we can't commit this | 1112 | /* If there was a write error in the journal - we can't commit this |
1168 | * transaction - it will be invalid and, if successful, will just end | 1113 | * transaction - it will be invalid and, if successful, will just end |
1169 | * up propagating the write error out to the filesystem. */ | 1114 | * up propagating the write error out to the filesystem. */ |
@@ -1319,26 +1264,15 @@ static int _update_journal_header_block(struct super_block *sb, | |||
1319 | jh->j_first_unflushed_offset = cpu_to_le32(offset); | 1264 | jh->j_first_unflushed_offset = cpu_to_le32(offset); |
1320 | jh->j_mount_id = cpu_to_le32(journal->j_mount_id); | 1265 | jh->j_mount_id = cpu_to_le32(journal->j_mount_id); |
1321 | 1266 | ||
1322 | if (reiserfs_barrier_flush(sb)) { | 1267 | set_buffer_dirty(journal->j_header_bh); |
1323 | int ret; | 1268 | reiserfs_write_unlock(sb); |
1324 | lock_buffer(journal->j_header_bh); | 1269 | |
1325 | ret = submit_barrier_buffer(journal->j_header_bh); | 1270 | if (reiserfs_barrier_flush(sb)) |
1326 | if (ret == -EOPNOTSUPP) { | 1271 | __sync_dirty_buffer(journal->j_header_bh, WRITE_FLUSH_FUA); |
1327 | set_buffer_uptodate(journal->j_header_bh); | 1272 | else |
1328 | disable_barrier(sb); | ||
1329 | goto sync; | ||
1330 | } | ||
1331 | reiserfs_write_unlock(sb); | ||
1332 | wait_on_buffer(journal->j_header_bh); | ||
1333 | reiserfs_write_lock(sb); | ||
1334 | check_barrier_completion(sb, journal->j_header_bh); | ||
1335 | } else { | ||
1336 | sync: | ||
1337 | set_buffer_dirty(journal->j_header_bh); | ||
1338 | reiserfs_write_unlock(sb); | ||
1339 | sync_dirty_buffer(journal->j_header_bh); | 1273 | sync_dirty_buffer(journal->j_header_bh); |
1340 | reiserfs_write_lock(sb); | 1274 | |
1341 | } | 1275 | reiserfs_write_lock(sb); |
1342 | if (!buffer_uptodate(journal->j_header_bh)) { | 1276 | if (!buffer_uptodate(journal->j_header_bh)) { |
1343 | reiserfs_warning(sb, "journal-837", | 1277 | reiserfs_warning(sb, "journal-837", |
1344 | "IO error during journal replay"); | 1278 | "IO error during journal replay"); |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index ee78d4a0086a..ba5f51ec3458 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -1156,7 +1156,7 @@ static int reiserfs_link(struct dentry *old_dentry, struct inode *dir, | |||
1156 | inode->i_ctime = CURRENT_TIME_SEC; | 1156 | inode->i_ctime = CURRENT_TIME_SEC; |
1157 | reiserfs_update_sd(&th, inode); | 1157 | reiserfs_update_sd(&th, inode); |
1158 | 1158 | ||
1159 | atomic_inc(&inode->i_count); | 1159 | ihold(inode); |
1160 | d_instantiate(dentry, inode); | 1160 | d_instantiate(dentry, inode); |
1161 | retval = journal_end(&th, dir->i_sb, jbegin_count); | 1161 | retval = journal_end(&th, dir->i_sb, jbegin_count); |
1162 | reiserfs_write_unlock(dir->i_sb); | 1162 | reiserfs_write_unlock(dir->i_sb); |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index e15ff612002d..3bf7a6457f4d 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -2213,12 +2213,11 @@ out: | |||
2213 | 2213 | ||
2214 | #endif | 2214 | #endif |
2215 | 2215 | ||
2216 | static int get_super_block(struct file_system_type *fs_type, | 2216 | static struct dentry *get_super_block(struct file_system_type *fs_type, |
2217 | int flags, const char *dev_name, | 2217 | int flags, const char *dev_name, |
2218 | void *data, struct vfsmount *mnt) | 2218 | void *data) |
2219 | { | 2219 | { |
2220 | return get_sb_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super, | 2220 | return mount_bdev(fs_type, flags, dev_name, data, reiserfs_fill_super); |
2221 | mnt); | ||
2222 | } | 2221 | } |
2223 | 2222 | ||
2224 | static int __init init_reiserfs_fs(void) | 2223 | static int __init init_reiserfs_fs(void) |
@@ -2253,7 +2252,7 @@ static void __exit exit_reiserfs_fs(void) | |||
2253 | struct file_system_type reiserfs_fs_type = { | 2252 | struct file_system_type reiserfs_fs_type = { |
2254 | .owner = THIS_MODULE, | 2253 | .owner = THIS_MODULE, |
2255 | .name = "reiserfs", | 2254 | .name = "reiserfs", |
2256 | .get_sb = get_super_block, | 2255 | .mount = get_super_block, |
2257 | .kill_sb = reiserfs_kill_sb, | 2256 | .kill_sb = reiserfs_kill_sb, |
2258 | .fs_flags = FS_REQUIRES_DEV, | 2257 | .fs_flags = FS_REQUIRES_DEV, |
2259 | }; | 2258 | }; |
diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c index 8c4cf273c672..5d04a7828e7a 100644 --- a/fs/reiserfs/xattr.c +++ b/fs/reiserfs/xattr.c | |||
@@ -418,13 +418,11 @@ static inline __u32 xattr_hash(const char *msg, int len) | |||
418 | 418 | ||
419 | int reiserfs_commit_write(struct file *f, struct page *page, | 419 | int reiserfs_commit_write(struct file *f, struct page *page, |
420 | unsigned from, unsigned to); | 420 | unsigned from, unsigned to); |
421 | int reiserfs_prepare_write(struct file *f, struct page *page, | ||
422 | unsigned from, unsigned to); | ||
423 | 421 | ||
424 | static void update_ctime(struct inode *inode) | 422 | static void update_ctime(struct inode *inode) |
425 | { | 423 | { |
426 | struct timespec now = current_fs_time(inode->i_sb); | 424 | struct timespec now = current_fs_time(inode->i_sb); |
427 | if (hlist_unhashed(&inode->i_hash) || !inode->i_nlink || | 425 | if (inode_unhashed(inode) || !inode->i_nlink || |
428 | timespec_equal(&inode->i_ctime, &now)) | 426 | timespec_equal(&inode->i_ctime, &now)) |
429 | return; | 427 | return; |
430 | 428 | ||
@@ -532,8 +530,7 @@ reiserfs_xattr_set_handle(struct reiserfs_transaction_handle *th, | |||
532 | rxh->h_hash = cpu_to_le32(xahash); | 530 | rxh->h_hash = cpu_to_le32(xahash); |
533 | } | 531 | } |
534 | 532 | ||
535 | err = reiserfs_prepare_write(NULL, page, page_offset, | 533 | err = __reiserfs_write_begin(page, page_offset, chunk + skip); |
536 | page_offset + chunk + skip); | ||
537 | if (!err) { | 534 | if (!err) { |
538 | if (buffer) | 535 | if (buffer) |
539 | memcpy(data + skip, buffer + buffer_pos, chunk); | 536 | memcpy(data + skip, buffer + buffer_pos, chunk); |