aboutsummaryrefslogtreecommitdiffstats
path: root/fs/inode.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-06-12 10:20:35 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-31 01:40:38 -0400
commiteb04c28288bb0098d0e75d81ba2a575239de71d8 (patch)
tree82912fd7c78be269560a8af7d8516918c279255b /fs/inode.c
parent5accdf82ba25cacefd6c1867f1704beb4d244cdd (diff)
fs: Add freezing handling to mnt_want_write() / mnt_drop_write()
Most of places where we want freeze protection coincides with the places where we also have remount-ro protection. So make mnt_want_write() and mnt_drop_write() (and their _file alternative) prevent freezing as well. For the few cases that are really interested only in remount-ro protection provide new function variants. BugLink: https://bugs.launchpad.net/bugs/897421 Tested-by: Kamal Mostafa <kamal@canonical.com> Tested-by: Peter M. Petrakis <peter.petrakis@canonical.com> Tested-by: Dann Frazier <dann.frazier@canonical.com> Tested-by: Massimo Morana <massimo.morana@canonical.com> Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/inode.c')
-rw-r--r--fs/inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/inode.c b/fs/inode.c
index 775cbabd4fa5..006c85ca06eb 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -1660,11 +1660,11 @@ int file_update_time(struct file *file)
1660 return 0; 1660 return 0;
1661 1661
1662 /* Finally allowed to write? Takes lock. */ 1662 /* Finally allowed to write? Takes lock. */
1663 if (mnt_want_write_file(file)) 1663 if (__mnt_want_write_file(file))
1664 return 0; 1664 return 0;
1665 1665
1666 ret = update_time(inode, &now, sync_it); 1666 ret = update_time(inode, &now, sync_it);
1667 mnt_drop_write_file(file); 1667 __mnt_drop_write_file(file);
1668 1668
1669 return ret; 1669 return ret;
1670} 1670}