aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-22 01:34:26 -0500
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>2008-12-22 01:34:26 -0500
commit27a0464a6cb837d3a90b6e69365dfc01cb0dff2f (patch)
tree361f00f4d4ad4c01b6144c52004bee2b948742ad /fs
parent4d9d4ebf5de848e3450e23e4db9ac74e23e5daa6 (diff)
parent3d44cc3e01ee1b40317f79ed54324e25c4f848df (diff)
[XFS] Fix merge conflict in fs/xfs/xfs_rename.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 Conflicts: fs/xfs/xfs_rename.c Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/fid.c4
-rw-r--r--fs/9p/v9fs.c2
-rw-r--r--fs/9p/vfs_dentry.c9
-rw-r--r--fs/9p/vfs_inode.c6
-rw-r--r--fs/block_dev.c21
-rw-r--r--fs/cifs/cifssmb.c3
-rw-r--r--fs/exec.c10
-rw-r--r--fs/exportfs/expfs.c4
-rw-r--r--fs/ext4/balloc.c4
-rw-r--r--fs/fcntl.c7
-rw-r--r--fs/inotify.c2
-rw-r--r--fs/ioctl.c12
-rw-r--r--fs/ocfs2/ocfs2_fs.h8
-rw-r--r--fs/ocfs2/xattr.c4
-rw-r--r--fs/proc/base.c2
-rw-r--r--fs/proc/task_mmu.c4
16 files changed, 75 insertions, 27 deletions
diff --git a/fs/9p/fid.c b/fs/9p/fid.c
index 3031e3233dd6..2a983d49d19c 100644
--- a/fs/9p/fid.c
+++ b/fs/9p/fid.c
@@ -45,7 +45,7 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
45 struct v9fs_dentry *dent; 45 struct v9fs_dentry *dent;
46 46
47 P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n", 47 P9_DPRINTK(P9_DEBUG_VFS, "fid %d dentry %s\n",
48 fid->fid, dentry->d_iname); 48 fid->fid, dentry->d_name.name);
49 49
50 dent = dentry->d_fsdata; 50 dent = dentry->d_fsdata;
51 if (!dent) { 51 if (!dent) {
@@ -79,7 +79,7 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, u32 uid, int any)
79 struct p9_fid *fid, *ret; 79 struct p9_fid *fid, *ret;
80 80
81 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n", 81 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p) uid %d any %d\n",
82 dentry->d_iname, dentry, uid, any); 82 dentry->d_name.name, dentry, uid, any);
83 dent = (struct v9fs_dentry *) dentry->d_fsdata; 83 dent = (struct v9fs_dentry *) dentry->d_fsdata;
84 ret = NULL; 84 ret = NULL;
85 if (dent) { 85 if (dent) {
diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
index 24eb01087b6d..332b5ff02fec 100644
--- a/fs/9p/v9fs.c
+++ b/fs/9p/v9fs.c
@@ -160,7 +160,7 @@ static int v9fs_parse_options(struct v9fs_session_info *v9ses)
160 v9ses->flags |= V9FS_ACCESS_ANY; 160 v9ses->flags |= V9FS_ACCESS_ANY;
161 else { 161 else {
162 v9ses->flags |= V9FS_ACCESS_SINGLE; 162 v9ses->flags |= V9FS_ACCESS_SINGLE;
163 v9ses->uid = simple_strtol(s, &e, 10); 163 v9ses->uid = simple_strtoul(s, &e, 10);
164 if (*e != '\0') 164 if (*e != '\0')
165 v9ses->uid = ~0; 165 v9ses->uid = ~0;
166 } 166 }
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index f9534f18df0a..06dcc7c4f234 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -52,7 +52,8 @@
52 52
53static int v9fs_dentry_delete(struct dentry *dentry) 53static int v9fs_dentry_delete(struct dentry *dentry)
54{ 54{
55 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); 55 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
56 dentry);
56 57
57 return 1; 58 return 1;
58} 59}
@@ -69,7 +70,8 @@ static int v9fs_dentry_delete(struct dentry *dentry)
69static int v9fs_cached_dentry_delete(struct dentry *dentry) 70static int v9fs_cached_dentry_delete(struct dentry *dentry)
70{ 71{
71 struct inode *inode = dentry->d_inode; 72 struct inode *inode = dentry->d_inode;
72 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); 73 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
74 dentry);
73 75
74 if(!inode) 76 if(!inode)
75 return 1; 77 return 1;
@@ -88,7 +90,8 @@ void v9fs_dentry_release(struct dentry *dentry)
88 struct v9fs_dentry *dent; 90 struct v9fs_dentry *dent;
89 struct p9_fid *temp, *current_fid; 91 struct p9_fid *temp, *current_fid;
90 92
91 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); 93 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
94 dentry);
92 dent = dentry->d_fsdata; 95 dent = dentry->d_fsdata;
93 if (dent) { 96 if (dent) {
94 list_for_each_entry_safe(current_fid, temp, &dent->fidlist, 97 list_for_each_entry_safe(current_fid, temp, &dent->fidlist,
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 8314d3f43b71..2dfcf5487efe 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -963,7 +963,8 @@ static int v9fs_vfs_readlink(struct dentry *dentry, char __user * buffer,
963 if (buflen > PATH_MAX) 963 if (buflen > PATH_MAX)
964 buflen = PATH_MAX; 964 buflen = PATH_MAX;
965 965
966 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_iname, dentry); 966 P9_DPRINTK(P9_DEBUG_VFS, " dentry: %s (%p)\n", dentry->d_name.name,
967 dentry);
967 968
968 retval = v9fs_readlink(dentry, link, buflen); 969 retval = v9fs_readlink(dentry, link, buflen);
969 970
@@ -1022,7 +1023,8 @@ v9fs_vfs_put_link(struct dentry *dentry, struct nameidata *nd, void *p)
1022{ 1023{
1023 char *s = nd_get_link(nd); 1024 char *s = nd_get_link(nd);
1024 1025
1025 P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name, s); 1026 P9_DPRINTK(P9_DEBUG_VFS, " %s %s\n", dentry->d_name.name,
1027 IS_ERR(s) ? "<error>" : s);
1026 if (!IS_ERR(s)) 1028 if (!IS_ERR(s))
1027 __putname(s); 1029 __putname(s);
1028} 1030}
diff --git a/fs/block_dev.c b/fs/block_dev.c
index db831efbdbbd..99e0ae1a4c78 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1135,12 +1135,15 @@ static int blkdev_open(struct inode * inode, struct file * filp)
1135 if (res) 1135 if (res)
1136 return res; 1136 return res;
1137 1137
1138 if (!(filp->f_mode & FMODE_EXCL)) 1138 if (filp->f_mode & FMODE_EXCL) {
1139 return 0; 1139 res = bd_claim(bdev, filp);
1140 if (res)
1141 goto out_blkdev_put;
1142 }
1140 1143
1141 if (!(res = bd_claim(bdev, filp))) 1144 return 0;
1142 return 0;
1143 1145
1146 out_blkdev_put:
1144 blkdev_put(bdev, filp->f_mode); 1147 blkdev_put(bdev, filp->f_mode);
1145 return res; 1148 return res;
1146} 1149}
@@ -1203,8 +1206,16 @@ static long block_ioctl(struct file *file, unsigned cmd, unsigned long arg)
1203{ 1206{
1204 struct block_device *bdev = I_BDEV(file->f_mapping->host); 1207 struct block_device *bdev = I_BDEV(file->f_mapping->host);
1205 fmode_t mode = file->f_mode; 1208 fmode_t mode = file->f_mode;
1209
1210 /*
1211 * O_NDELAY can be altered using fcntl(.., F_SETFL, ..), so we have
1212 * to updated it before every ioctl.
1213 */
1206 if (file->f_flags & O_NDELAY) 1214 if (file->f_flags & O_NDELAY)
1207 mode |= FMODE_NDELAY_NOW; 1215 mode |= FMODE_NDELAY;
1216 else
1217 mode &= ~FMODE_NDELAY;
1218
1208 return blkdev_ioctl(bdev, mode, cmd, arg); 1219 return blkdev_ioctl(bdev, mode, cmd, arg);
1209} 1220}
1210 1221
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index 2af8626ced43..6d51696dc762 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -3983,7 +3983,8 @@ parse_DFS_referrals(TRANSACTION2_GET_DFS_REFER_RSP *pSMBr,
3983 3983
3984 node->flags = le16_to_cpu(pSMBr->DFSFlags); 3984 node->flags = le16_to_cpu(pSMBr->DFSFlags);
3985 if (is_unicode) { 3985 if (is_unicode) {
3986 __le16 *tmp = kmalloc(strlen(searchName)*2, GFP_KERNEL); 3986 __le16 *tmp = kmalloc(strlen(searchName)*2 + 2,
3987 GFP_KERNEL);
3987 cifsConvertToUCS((__le16 *) tmp, searchName, 3988 cifsConvertToUCS((__le16 *) tmp, searchName,
3988 PATH_MAX, nls_codepage, remap); 3989 PATH_MAX, nls_codepage, remap);
3989 node->path_consumed = hostlen_fromUCS(tmp, 3990 node->path_consumed = hostlen_fromUCS(tmp,
diff --git a/fs/exec.c b/fs/exec.c
index 4e834f16d9da..ec5df9a38313 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1159,6 +1159,7 @@ EXPORT_SYMBOL(remove_arg_zero);
1159 */ 1159 */
1160int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs) 1160int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
1161{ 1161{
1162 unsigned int depth = bprm->recursion_depth;
1162 int try,retval; 1163 int try,retval;
1163 struct linux_binfmt *fmt; 1164 struct linux_binfmt *fmt;
1164#ifdef __alpha__ 1165#ifdef __alpha__
@@ -1219,8 +1220,15 @@ int search_binary_handler(struct linux_binprm *bprm,struct pt_regs *regs)
1219 continue; 1220 continue;
1220 read_unlock(&binfmt_lock); 1221 read_unlock(&binfmt_lock);
1221 retval = fn(bprm, regs); 1222 retval = fn(bprm, regs);
1223 /*
1224 * Restore the depth counter to its starting value
1225 * in this call, so we don't have to rely on every
1226 * load_binary function to restore it on return.
1227 */
1228 bprm->recursion_depth = depth;
1222 if (retval >= 0) { 1229 if (retval >= 0) {
1223 tracehook_report_exec(fmt, bprm, regs); 1230 if (depth == 0)
1231 tracehook_report_exec(fmt, bprm, regs);
1224 put_binfmt(fmt); 1232 put_binfmt(fmt);
1225 allow_write_access(bprm->file); 1233 allow_write_access(bprm->file);
1226 if (bprm->file) 1234 if (bprm->file)
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 80246bad1b7f..890e01828817 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -367,6 +367,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
367 * Try to get any dentry for the given file handle from the filesystem. 367 * Try to get any dentry for the given file handle from the filesystem.
368 */ 368 */
369 result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type); 369 result = nop->fh_to_dentry(mnt->mnt_sb, fid, fh_len, fileid_type);
370 if (!result)
371 result = ERR_PTR(-ESTALE);
370 if (IS_ERR(result)) 372 if (IS_ERR(result))
371 return result; 373 return result;
372 374
@@ -420,6 +422,8 @@ struct dentry *exportfs_decode_fh(struct vfsmount *mnt, struct fid *fid,
420 422
421 target_dir = nop->fh_to_parent(mnt->mnt_sb, fid, 423 target_dir = nop->fh_to_parent(mnt->mnt_sb, fid,
422 fh_len, fileid_type); 424 fh_len, fileid_type);
425 if (!target_dir)
426 goto err_result;
423 err = PTR_ERR(target_dir); 427 err = PTR_ERR(target_dir);
424 if (IS_ERR(target_dir)) 428 if (IS_ERR(target_dir))
425 goto err_result; 429 goto err_result;
diff --git a/fs/ext4/balloc.c b/fs/ext4/balloc.c
index d2003cdc36aa..db35cfdb3c8b 100644
--- a/fs/ext4/balloc.c
+++ b/fs/ext4/balloc.c
@@ -609,8 +609,8 @@ int ext4_has_free_blocks(struct ext4_sb_info *sbi, s64 nblocks)
609 609
610 if (free_blocks - (nblocks + root_blocks + dirty_blocks) < 610 if (free_blocks - (nblocks + root_blocks + dirty_blocks) <
611 EXT4_FREEBLOCKS_WATERMARK) { 611 EXT4_FREEBLOCKS_WATERMARK) {
612 free_blocks = percpu_counter_sum(fbc); 612 free_blocks = percpu_counter_sum_positive(fbc);
613 dirty_blocks = percpu_counter_sum(dbc); 613 dirty_blocks = percpu_counter_sum_positive(dbc);
614 if (dirty_blocks < 0) { 614 if (dirty_blocks < 0) {
615 printk(KERN_CRIT "Dirty block accounting " 615 printk(KERN_CRIT "Dirty block accounting "
616 "went wrong %lld\n", 616 "went wrong %lld\n",
diff --git a/fs/fcntl.c b/fs/fcntl.c
index ac4f7db9f134..549daf8005fb 100644
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -19,6 +19,7 @@
19#include <linux/signal.h> 19#include <linux/signal.h>
20#include <linux/rcupdate.h> 20#include <linux/rcupdate.h>
21#include <linux/pid_namespace.h> 21#include <linux/pid_namespace.h>
22#include <linux/smp_lock.h>
22 23
23#include <asm/poll.h> 24#include <asm/poll.h>
24#include <asm/siginfo.h> 25#include <asm/siginfo.h>
@@ -175,6 +176,11 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
175 if (error) 176 if (error)
176 return error; 177 return error;
177 178
179 /*
180 * We still need a lock here for now to keep multiple FASYNC calls
181 * from racing with each other.
182 */
183 lock_kernel();
178 if ((arg ^ filp->f_flags) & FASYNC) { 184 if ((arg ^ filp->f_flags) & FASYNC) {
179 if (filp->f_op && filp->f_op->fasync) { 185 if (filp->f_op && filp->f_op->fasync) {
180 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0); 186 error = filp->f_op->fasync(fd, filp, (arg & FASYNC) != 0);
@@ -185,6 +191,7 @@ static int setfl(int fd, struct file * filp, unsigned long arg)
185 191
186 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK); 192 filp->f_flags = (arg & SETFL_MASK) | (filp->f_flags & ~SETFL_MASK);
187 out: 193 out:
194 unlock_kernel();
188 return error; 195 return error;
189} 196}
190 197
diff --git a/fs/inotify.c b/fs/inotify.c
index 7bbed1b89825..dae3f28f30d4 100644
--- a/fs/inotify.c
+++ b/fs/inotify.c
@@ -428,11 +428,13 @@ void inotify_unmount_inodes(struct list_head *list)
428 watches = &inode->inotify_watches; 428 watches = &inode->inotify_watches;
429 list_for_each_entry_safe(watch, next_w, watches, i_list) { 429 list_for_each_entry_safe(watch, next_w, watches, i_list) {
430 struct inotify_handle *ih= watch->ih; 430 struct inotify_handle *ih= watch->ih;
431 get_inotify_watch(watch);
431 mutex_lock(&ih->mutex); 432 mutex_lock(&ih->mutex);
432 ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0, 433 ih->in_ops->handle_event(watch, watch->wd, IN_UNMOUNT, 0,
433 NULL, NULL); 434 NULL, NULL);
434 inotify_remove_watch_locked(ih, watch); 435 inotify_remove_watch_locked(ih, watch);
435 mutex_unlock(&ih->mutex); 436 mutex_unlock(&ih->mutex);
437 put_inotify_watch(watch);
436 } 438 }
437 mutex_unlock(&inode->inotify_mutex); 439 mutex_unlock(&inode->inotify_mutex);
438 iput(inode); 440 iput(inode);
diff --git a/fs/ioctl.c b/fs/ioctl.c
index d152856c371b..43e8b2c0664b 100644
--- a/fs/ioctl.c
+++ b/fs/ioctl.c
@@ -400,11 +400,9 @@ static int ioctl_fioasync(unsigned int fd, struct file *filp,
400 400
401 /* Did FASYNC state change ? */ 401 /* Did FASYNC state change ? */
402 if ((flag ^ filp->f_flags) & FASYNC) { 402 if ((flag ^ filp->f_flags) & FASYNC) {
403 if (filp->f_op && filp->f_op->fasync) { 403 if (filp->f_op && filp->f_op->fasync)
404 lock_kernel();
405 error = filp->f_op->fasync(fd, filp, on); 404 error = filp->f_op->fasync(fd, filp, on);
406 unlock_kernel(); 405 else
407 } else
408 error = -ENOTTY; 406 error = -ENOTTY;
409 } 407 }
410 if (error) 408 if (error)
@@ -440,11 +438,17 @@ int do_vfs_ioctl(struct file *filp, unsigned int fd, unsigned int cmd,
440 break; 438 break;
441 439
442 case FIONBIO: 440 case FIONBIO:
441 /* BKL needed to avoid races tweaking f_flags */
442 lock_kernel();
443 error = ioctl_fionbio(filp, argp); 443 error = ioctl_fionbio(filp, argp);
444 unlock_kernel();
444 break; 445 break;
445 446
446 case FIOASYNC: 447 case FIOASYNC:
448 /* BKL needed to avoid races tweaking f_flags */
449 lock_kernel();
447 error = ioctl_fioasync(fd, filp, argp); 450 error = ioctl_fioasync(fd, filp, argp);
451 unlock_kernel();
448 break; 452 break;
449 453
450 case FIOQSIZE: 454 case FIOQSIZE:
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h
index 5f180cf7abbd..5e0c0d0aef7d 100644
--- a/fs/ocfs2/ocfs2_fs.h
+++ b/fs/ocfs2/ocfs2_fs.h
@@ -86,7 +86,8 @@
86#define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask) \ 86#define OCFS2_CLEAR_INCOMPAT_FEATURE(sb,mask) \
87 OCFS2_SB(sb)->s_feature_incompat &= ~(mask) 87 OCFS2_SB(sb)->s_feature_incompat &= ~(mask)
88 88
89#define OCFS2_FEATURE_COMPAT_SUPP OCFS2_FEATURE_COMPAT_BACKUP_SB 89#define OCFS2_FEATURE_COMPAT_SUPP (OCFS2_FEATURE_COMPAT_BACKUP_SB \
90 | OCFS2_FEATURE_COMPAT_JBD2_SB)
90#define OCFS2_FEATURE_INCOMPAT_SUPP (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \ 91#define OCFS2_FEATURE_INCOMPAT_SUPP (OCFS2_FEATURE_INCOMPAT_LOCAL_MOUNT \
91 | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \ 92 | OCFS2_FEATURE_INCOMPAT_SPARSE_ALLOC \
92 | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \ 93 | OCFS2_FEATURE_INCOMPAT_INLINE_DATA \
@@ -153,6 +154,11 @@
153#define OCFS2_FEATURE_COMPAT_BACKUP_SB 0x0001 154#define OCFS2_FEATURE_COMPAT_BACKUP_SB 0x0001
154 155
155/* 156/*
157 * The filesystem will correctly handle journal feature bits.
158 */
159#define OCFS2_FEATURE_COMPAT_JBD2_SB 0x0002
160
161/*
156 * Unwritten extents support. 162 * Unwritten extents support.
157 */ 163 */
158#define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001 164#define OCFS2_FEATURE_RO_COMPAT_UNWRITTEN 0x0001
diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
index 054e2efb0b7e..74d7367ade13 100644
--- a/fs/ocfs2/xattr.c
+++ b/fs/ocfs2/xattr.c
@@ -2645,9 +2645,9 @@ static int ocfs2_xattr_update_xattr_search(struct inode *inode,
2645 return ret; 2645 return ret;
2646 } 2646 }
2647 2647
2648 i = xs->here - old_xh->xh_entries;
2649 xs->here = &xs->header->xh_entries[i];
2650 } 2648 }
2649 i = xs->here - old_xh->xh_entries;
2650 xs->here = &xs->header->xh_entries[i];
2651 } 2651 }
2652 2652
2653 return ret; 2653 return ret;
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 486cf3fe7139..d4677603c889 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -371,7 +371,7 @@ static int lstats_show_proc(struct seq_file *m, void *v)
371 task->latency_record[i].time, 371 task->latency_record[i].time,
372 task->latency_record[i].max); 372 task->latency_record[i].max);
373 for (q = 0; q < LT_BACKTRACEDEPTH; q++) { 373 for (q = 0; q < LT_BACKTRACEDEPTH; q++) {
374 char sym[KSYM_NAME_LEN]; 374 char sym[KSYM_SYMBOL_LEN];
375 char *c; 375 char *c;
376 if (!task->latency_record[i].backtrace[q]) 376 if (!task->latency_record[i].backtrace[q])
377 break; 377 break;
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index b770c095e45c..3a8bdd7f5756 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -557,9 +557,9 @@ static u64 swap_pte_to_pagemap_entry(pte_t pte)
557 return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT); 557 return swp_type(e) | (swp_offset(e) << MAX_SWAPFILES_SHIFT);
558} 558}
559 559
560static unsigned long pte_to_pagemap_entry(pte_t pte) 560static u64 pte_to_pagemap_entry(pte_t pte)
561{ 561{
562 unsigned long pme = 0; 562 u64 pme = 0;
563 if (is_swap_pte(pte)) 563 if (is_swap_pte(pte))
564 pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte)) 564 pme = PM_PFRAME(swap_pte_to_pagemap_entry(pte))
565 | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP; 565 | PM_PSHIFT(PAGE_SHIFT) | PM_SWAP;