summaryrefslogtreecommitdiffstats
path: root/fs/smbfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/smbfs/file.c')
-rw-r--r--fs/smbfs/file.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/smbfs/file.c b/fs/smbfs/file.c
index 2611ceb61..cfb2d82da 100644
--- a/fs/smbfs/file.c
+++ b/fs/smbfs/file.c
@@ -14,6 +14,7 @@
#include <linux/mm.h>
#include <linux/malloc.h>
#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/system.h>
@@ -271,8 +272,11 @@ static long smb_write_one_page(struct file *file, struct page *page, unsigned lo
bytes -= copy_from_user((u8*)page_address(page) + offset, buf, bytes);
status = -EFAULT;
- if (bytes)
+ if (bytes) {
+ lock_kernel();
status = smb_updatepage(file, page, offset, bytes);
+ unlock_kernel();
+ }
return status;
}
@@ -406,6 +410,5 @@ struct inode_operations smb_file_inode_operations =
NULL, /* truncate */
smb_file_permission, /* permission */
NULL, /* smap */
- NULL, /* updatepage */
smb_revalidate_inode, /* revalidate */
};