diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/inode.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 6 | ||||
-rw-r--r-- | fs/reiserfs/super.c | 17 |
3 files changed, 13 insertions, 12 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c index 192269698a8a..5699171212ae 100644 --- a/fs/reiserfs/inode.c +++ b/fs/reiserfs/inode.c | |||
@@ -2435,7 +2435,7 @@ static int reiserfs_write_full_page(struct page *page, | |||
2435 | if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { | 2435 | if (wbc->sync_mode != WB_SYNC_NONE || !wbc->nonblocking) { |
2436 | lock_buffer(bh); | 2436 | lock_buffer(bh); |
2437 | } else { | 2437 | } else { |
2438 | if (test_set_buffer_locked(bh)) { | 2438 | if (!trylock_buffer(bh)) { |
2439 | redirty_page_for_writepage(wbc, page); | 2439 | redirty_page_for_writepage(wbc, page); |
2440 | continue; | 2440 | continue; |
2441 | } | 2441 | } |
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index c8f60ee183b5..c21df71943a6 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -627,7 +627,7 @@ static int journal_list_still_alive(struct super_block *s, | |||
627 | static void release_buffer_page(struct buffer_head *bh) | 627 | static void release_buffer_page(struct buffer_head *bh) |
628 | { | 628 | { |
629 | struct page *page = bh->b_page; | 629 | struct page *page = bh->b_page; |
630 | if (!page->mapping && !TestSetPageLocked(page)) { | 630 | if (!page->mapping && trylock_page(page)) { |
631 | page_cache_get(page); | 631 | page_cache_get(page); |
632 | put_bh(bh); | 632 | put_bh(bh); |
633 | if (!page->mapping) | 633 | if (!page->mapping) |
@@ -855,7 +855,7 @@ static int write_ordered_buffers(spinlock_t * lock, | |||
855 | jh = JH_ENTRY(list->next); | 855 | jh = JH_ENTRY(list->next); |
856 | bh = jh->bh; | 856 | bh = jh->bh; |
857 | get_bh(bh); | 857 | get_bh(bh); |
858 | if (test_set_buffer_locked(bh)) { | 858 | if (!trylock_buffer(bh)) { |
859 | if (!buffer_dirty(bh)) { | 859 | if (!buffer_dirty(bh)) { |
860 | list_move(&jh->list, &tmp); | 860 | list_move(&jh->list, &tmp); |
861 | goto loop_next; | 861 | goto loop_next; |
@@ -3871,7 +3871,7 @@ int reiserfs_prepare_for_journal(struct super_block *p_s_sb, | |||
3871 | { | 3871 | { |
3872 | PROC_INFO_INC(p_s_sb, journal.prepare); | 3872 | PROC_INFO_INC(p_s_sb, journal.prepare); |
3873 | 3873 | ||
3874 | if (test_set_buffer_locked(bh)) { | 3874 | if (!trylock_buffer(bh)) { |
3875 | if (!wait) | 3875 | if (!wait) |
3876 | return 0; | 3876 | return 0; |
3877 | lock_buffer(bh); | 3877 | lock_buffer(bh); |
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 879e54d35c2d..d318c7e663fa 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/mnt_namespace.h> | 27 | #include <linux/mnt_namespace.h> |
28 | #include <linux/mount.h> | 28 | #include <linux/mount.h> |
29 | #include <linux/namei.h> | 29 | #include <linux/namei.h> |
30 | #include <linux/quotaops.h> | ||
31 | 30 | ||
32 | struct file_system_type reiserfs_fs_type; | 31 | struct file_system_type reiserfs_fs_type; |
33 | 32 | ||
@@ -2076,8 +2075,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2076 | return err; | 2075 | return err; |
2077 | /* Quotafile not on the same filesystem? */ | 2076 | /* Quotafile not on the same filesystem? */ |
2078 | if (nd.path.mnt->mnt_sb != sb) { | 2077 | if (nd.path.mnt->mnt_sb != sb) { |
2079 | path_put(&nd.path); | 2078 | err = -EXDEV; |
2080 | return -EXDEV; | 2079 | goto out; |
2081 | } | 2080 | } |
2082 | inode = nd.path.dentry->d_inode; | 2081 | inode = nd.path.dentry->d_inode; |
2083 | /* We must not pack tails for quota files on reiserfs for quota IO to work */ | 2082 | /* We must not pack tails for quota files on reiserfs for quota IO to work */ |
@@ -2087,8 +2086,8 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2087 | reiserfs_warning(sb, | 2086 | reiserfs_warning(sb, |
2088 | "reiserfs: Unpacking tail of quota file failed" | 2087 | "reiserfs: Unpacking tail of quota file failed" |
2089 | " (%d). Cannot turn on quotas.", err); | 2088 | " (%d). Cannot turn on quotas.", err); |
2090 | path_put(&nd.path); | 2089 | err = -EINVAL; |
2091 | return -EINVAL; | 2090 | goto out; |
2092 | } | 2091 | } |
2093 | mark_inode_dirty(inode); | 2092 | mark_inode_dirty(inode); |
2094 | } | 2093 | } |
@@ -2109,13 +2108,15 @@ static int reiserfs_quota_on(struct super_block *sb, int type, int format_id, | |||
2109 | /* Just start temporary transaction and finish it */ | 2108 | /* Just start temporary transaction and finish it */ |
2110 | err = journal_begin(&th, sb, 1); | 2109 | err = journal_begin(&th, sb, 1); |
2111 | if (err) | 2110 | if (err) |
2112 | return err; | 2111 | goto out; |
2113 | err = journal_end_sync(&th, sb, 1); | 2112 | err = journal_end_sync(&th, sb, 1); |
2114 | if (err) | 2113 | if (err) |
2115 | return err; | 2114 | goto out; |
2116 | } | 2115 | } |
2116 | err = vfs_quota_on_path(sb, type, format_id, &nd.path); | ||
2117 | out: | ||
2117 | path_put(&nd.path); | 2118 | path_put(&nd.path); |
2118 | return vfs_quota_on(sb, type, format_id, path, 0); | 2119 | return err; |
2119 | } | 2120 | } |
2120 | 2121 | ||
2121 | /* Read data from quotafile - avoid pagecache and such because we cannot afford | 2122 | /* Read data from quotafile - avoid pagecache and such because we cannot afford |