aboutsummaryrefslogtreecommitdiffstats
path: root/mm/filemap_xip.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/filemap_xip.c')
-rw-r--r--mm/filemap_xip.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index 80b34ef82dfe..13e013b1270c 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -402,6 +402,8 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
402 loff_t pos; 402 loff_t pos;
403 ssize_t ret; 403 ssize_t ret;
404 404
405 sb_start_write(inode->i_sb);
406
405 mutex_lock(&inode->i_mutex); 407 mutex_lock(&inode->i_mutex);
406 408
407 if (!access_ok(VERIFY_READ, buf, len)) { 409 if (!access_ok(VERIFY_READ, buf, len)) {
@@ -412,8 +414,6 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
412 pos = *ppos; 414 pos = *ppos;
413 count = len; 415 count = len;
414 416
415 vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE);
416
417 /* We can write back this queue in page reclaim */ 417 /* We can write back this queue in page reclaim */
418 current->backing_dev_info = mapping->backing_dev_info; 418 current->backing_dev_info = mapping->backing_dev_info;
419 419
@@ -437,6 +437,7 @@ xip_file_write(struct file *filp, const char __user *buf, size_t len,
437 current->backing_dev_info = NULL; 437 current->backing_dev_info = NULL;
438 out_up: 438 out_up:
439 mutex_unlock(&inode->i_mutex); 439 mutex_unlock(&inode->i_mutex);
440 sb_end_write(inode->i_sb);
440 return ret; 441 return ret;
441} 442}
442EXPORT_SYMBOL_GPL(xip_file_write); 443EXPORT_SYMBOL_GPL(xip_file_write);