jfs_metapage.h (e5451c8f8330e03ad3cfa16048b4daf961af434f) | jfs_metapage.h (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a) |
---|---|
1/* 2 * Copyright (C) International Business Machines Corp., 2000-2002 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 92 unchanged lines hidden (view full) --- 101} 102 103static inline void metapage_nohomeok(struct metapage *mp) 104{ 105 struct page *page = mp->page; 106 lock_page(page); 107 if (!mp->nohomeok++) { 108 mark_metapage_dirty(mp); | 1/* 2 * Copyright (C) International Business Machines Corp., 2000-2002 3 * Portions Copyright (C) Christoph Hellwig, 2001-2002 4 * 5 * This program is free software; you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation; either version 2 of the License, or 8 * (at your option) any later version. --- 92 unchanged lines hidden (view full) --- 101} 102 103static inline void metapage_nohomeok(struct metapage *mp) 104{ 105 struct page *page = mp->page; 106 lock_page(page); 107 if (!mp->nohomeok++) { 108 mark_metapage_dirty(mp); |
109 page_cache_get(page); | 109 get_page(page); |
110 wait_on_page_writeback(page); 111 } 112 unlock_page(page); 113} 114 115/* 116 * This serializes access to mp->lsn when metapages are added to logsynclist 117 * without setting nohomeok. i.e. updating imap & dmap --- 5 unchanged lines hidden (view full) --- 123} 124 125/* 126 * This is called when already holding the metapage 127 */ 128static inline void _metapage_homeok(struct metapage *mp) 129{ 130 if (!--mp->nohomeok) | 110 wait_on_page_writeback(page); 111 } 112 unlock_page(page); 113} 114 115/* 116 * This serializes access to mp->lsn when metapages are added to logsynclist 117 * without setting nohomeok. i.e. updating imap & dmap --- 5 unchanged lines hidden (view full) --- 123} 124 125/* 126 * This is called when already holding the metapage 127 */ 128static inline void _metapage_homeok(struct metapage *mp) 129{ 130 if (!--mp->nohomeok) |
131 page_cache_release(mp->page); | 131 put_page(mp->page); |
132} 133 134static inline void metapage_homeok(struct metapage *mp) 135{ 136 hold_metapage(mp); 137 _metapage_homeok(mp); 138 put_metapage(mp); 139} --- 15 unchanged lines hidden --- | 132} 133 134static inline void metapage_homeok(struct metapage *mp) 135{ 136 hold_metapage(mp); 137 _metapage_homeok(mp); 138 put_metapage(mp); 139} --- 15 unchanged lines hidden --- |