Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23441
b: refs/heads/master
c: 4741c9f
h: refs/heads/master
i:
  23439: 8a402b8
v: v3
  • Loading branch information
Andrew Morton authored and Linus Torvalds committed Mar 24, 2006
1 parent c605e00 commit 72df833
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fa5a734e406b53761fcc5ee22366006f71112c2d
refs/heads/master: 4741c9fd36b3bcadd37238321c469049da94a4b9
2 changes: 1 addition & 1 deletion trunk/arch/cris/arch-v32/drivers/cryptocop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2944,7 +2944,7 @@ static int cryptocop_ioctl_process(struct inode *inode, struct file *filp, unsig
int spdl_err;
/* Mark output pages dirty. */
spdl_err = set_page_dirty_lock(outpages[i]);
DEBUG(if (spdl_err)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err));
DEBUG(if (spdl_err < 0)printk("cryptocop_ioctl_process: set_page_dirty_lock returned %d\n", spdl_err));
}
for (i = 0; i < nooutpages; i++){
put_page(outpages[i]);
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/block/rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,8 @@ static int ramdisk_writepages(struct address_space *mapping,
*/
static int ramdisk_set_page_dirty(struct page *page)
{
SetPageDirty(page);
if (!TestSetPageDirty(page))
return 1;
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -865,8 +865,8 @@ int __set_page_dirty_buffers(struct page *page)
}
write_unlock_irq(&mapping->tree_lock);
__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
return 1;
}

return 0;
}
EXPORT_SYMBOL(__set_page_dirty_buffers);
Expand Down
2 changes: 1 addition & 1 deletion trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ struct address_space_operations {
/* Write back some dirty pages from this mapping. */
int (*writepages)(struct address_space *, struct writeback_control *);

/* Set a page dirty */
/* Set a page dirty. Return true if this dirtied it */
int (*set_page_dirty)(struct page *page);

int (*readpages)(struct file *filp, struct address_space *mapping,
Expand Down
11 changes: 6 additions & 5 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -628,8 +628,6 @@ EXPORT_SYMBOL(write_one_page);
*/
int __set_page_dirty_nobuffers(struct page *page)
{
int ret = 0;

if (!TestSetPageDirty(page)) {
struct address_space *mapping = page_mapping(page);
struct address_space *mapping2;
Expand All @@ -651,8 +649,9 @@ int __set_page_dirty_nobuffers(struct page *page)
I_DIRTY_PAGES);
}
}
return 1;
}
return ret;
return 0;
}
EXPORT_SYMBOL(__set_page_dirty_nobuffers);

Expand Down Expand Up @@ -682,8 +681,10 @@ int fastcall set_page_dirty(struct page *page)
return (*spd)(page);
return __set_page_dirty_buffers(page);
}
if (!PageDirty(page))
SetPageDirty(page);
if (!PageDirty(page)) {
if (!TestSetPageDirty(page))
return 1;
}
return 0;
}
EXPORT_SYMBOL(set_page_dirty);
Expand Down

0 comments on commit 72df833

Please sign in to comment.