diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/btrfs/inode.c | 1 | ||||
-rw-r--r-- | fs/buffer.c | 14 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 6 | ||||
-rw-r--r-- | fs/cifs/cifspdu.h | 31 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 40 | ||||
-rw-r--r-- | fs/cifs/netmisc.c | 4 | ||||
-rw-r--r-- | fs/cifs/sess.c | 4 | ||||
-rw-r--r-- | fs/cifs/smb2pdu.c | 6 | ||||
-rw-r--r-- | fs/cifs/smbfsctl.h | 14 | ||||
-rw-r--r-- | fs/cifs/transport.c | 9 | ||||
-rw-r--r-- | fs/ext3/namei.c | 5 | ||||
-rw-r--r-- | fs/ext4/namei.c | 5 | ||||
-rw-r--r-- | fs/proc/inode.c | 10 | ||||
-rw-r--r-- | fs/proc/task_mmu.c | 4 |
14 files changed, 120 insertions, 33 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index b0ef7b07b1b3..51e3afa78354 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -6437,6 +6437,7 @@ noinline int can_nocow_extent(struct inode *inode, u64 offset, u64 *len, | |||
6437 | 6437 | ||
6438 | if (btrfs_extent_readonly(root, disk_bytenr)) | 6438 | if (btrfs_extent_readonly(root, disk_bytenr)) |
6439 | goto out; | 6439 | goto out; |
6440 | btrfs_release_path(path); | ||
6440 | 6441 | ||
6441 | /* | 6442 | /* |
6442 | * look for other files referencing this extent, if we | 6443 | * look for other files referencing this extent, if we |
diff --git a/fs/buffer.c b/fs/buffer.c index 4d7433534f5c..6024877335ca 100644 --- a/fs/buffer.c +++ b/fs/buffer.c | |||
@@ -1005,9 +1005,19 @@ grow_dev_page(struct block_device *bdev, sector_t block, | |||
1005 | struct buffer_head *bh; | 1005 | struct buffer_head *bh; |
1006 | sector_t end_block; | 1006 | sector_t end_block; |
1007 | int ret = 0; /* Will call free_more_memory() */ | 1007 | int ret = 0; /* Will call free_more_memory() */ |
1008 | gfp_t gfp_mask; | ||
1008 | 1009 | ||
1009 | page = find_or_create_page(inode->i_mapping, index, | 1010 | gfp_mask = mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS; |
1010 | (mapping_gfp_mask(inode->i_mapping) & ~__GFP_FS)|__GFP_MOVABLE); | 1011 | gfp_mask |= __GFP_MOVABLE; |
1012 | /* | ||
1013 | * XXX: __getblk_slow() can not really deal with failure and | ||
1014 | * will endlessly loop on improvised global reclaim. Prefer | ||
1015 | * looping in the allocator rather than here, at least that | ||
1016 | * code knows what it's doing. | ||
1017 | */ | ||
1018 | gfp_mask |= __GFP_NOFAIL; | ||
1019 | |||
1020 | page = find_or_create_page(inode->i_mapping, index, gfp_mask); | ||
1011 | if (!page) | 1021 | if (!page) |
1012 | return ret; | 1022 | return ret; |
1013 | 1023 | ||
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index a16b4e58bcc6..77fc5e181077 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -120,14 +120,16 @@ cifs_read_super(struct super_block *sb) | |||
120 | { | 120 | { |
121 | struct inode *inode; | 121 | struct inode *inode; |
122 | struct cifs_sb_info *cifs_sb; | 122 | struct cifs_sb_info *cifs_sb; |
123 | struct cifs_tcon *tcon; | ||
123 | int rc = 0; | 124 | int rc = 0; |
124 | 125 | ||
125 | cifs_sb = CIFS_SB(sb); | 126 | cifs_sb = CIFS_SB(sb); |
127 | tcon = cifs_sb_master_tcon(cifs_sb); | ||
126 | 128 | ||
127 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) | 129 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIXACL) |
128 | sb->s_flags |= MS_POSIXACL; | 130 | sb->s_flags |= MS_POSIXACL; |
129 | 131 | ||
130 | if (cifs_sb_master_tcon(cifs_sb)->ses->capabilities & CAP_LARGE_FILES) | 132 | if (tcon->ses->capabilities & tcon->ses->server->vals->cap_large_files) |
131 | sb->s_maxbytes = MAX_LFS_FILESIZE; | 133 | sb->s_maxbytes = MAX_LFS_FILESIZE; |
132 | else | 134 | else |
133 | sb->s_maxbytes = MAX_NON_LFS; | 135 | sb->s_maxbytes = MAX_NON_LFS; |
@@ -147,7 +149,7 @@ cifs_read_super(struct super_block *sb) | |||
147 | goto out_no_root; | 149 | goto out_no_root; |
148 | } | 150 | } |
149 | 151 | ||
150 | if (cifs_sb_master_tcon(cifs_sb)->nocase) | 152 | if (tcon->nocase) |
151 | sb->s_d_op = &cifs_ci_dentry_ops; | 153 | sb->s_d_op = &cifs_ci_dentry_ops; |
152 | else | 154 | else |
153 | sb->s_d_op = &cifs_dentry_ops; | 155 | sb->s_d_op = &cifs_dentry_ops; |
diff --git a/fs/cifs/cifspdu.h b/fs/cifs/cifspdu.h index a630475e421c..08f9dfb1a894 100644 --- a/fs/cifs/cifspdu.h +++ b/fs/cifs/cifspdu.h | |||
@@ -1491,15 +1491,30 @@ struct file_notify_information { | |||
1491 | __u8 FileName[0]; | 1491 | __u8 FileName[0]; |
1492 | } __attribute__((packed)); | 1492 | } __attribute__((packed)); |
1493 | 1493 | ||
1494 | struct reparse_data { | 1494 | /* For IO_REPARSE_TAG_SYMLINK */ |
1495 | __u32 ReparseTag; | 1495 | struct reparse_symlink_data { |
1496 | __u16 ReparseDataLength; | 1496 | __le32 ReparseTag; |
1497 | __le16 ReparseDataLength; | ||
1497 | __u16 Reserved; | 1498 | __u16 Reserved; |
1498 | __u16 SubstituteNameOffset; | 1499 | __le16 SubstituteNameOffset; |
1499 | __u16 SubstituteNameLength; | 1500 | __le16 SubstituteNameLength; |
1500 | __u16 PrintNameOffset; | 1501 | __le16 PrintNameOffset; |
1501 | __u16 PrintNameLength; | 1502 | __le16 PrintNameLength; |
1502 | __u32 Flags; | 1503 | __le32 Flags; |
1504 | char PathBuffer[0]; | ||
1505 | } __attribute__((packed)); | ||
1506 | |||
1507 | /* For IO_REPARSE_TAG_NFS */ | ||
1508 | #define NFS_SPECFILE_LNK 0x00000000014B4E4C | ||
1509 | #define NFS_SPECFILE_CHR 0x0000000000524843 | ||
1510 | #define NFS_SPECFILE_BLK 0x00000000004B4C42 | ||
1511 | #define NFS_SPECFILE_FIFO 0x000000004F464946 | ||
1512 | #define NFS_SPECFILE_SOCK 0x000000004B434F53 | ||
1513 | struct reparse_posix_data { | ||
1514 | __le32 ReparseTag; | ||
1515 | __le16 ReparseDataLength; | ||
1516 | __u16 Reserved; | ||
1517 | __le64 InodeType; /* LNK, FIFO, CHR etc. */ | ||
1503 | char PathBuffer[0]; | 1518 | char PathBuffer[0]; |
1504 | } __attribute__((packed)); | 1519 | } __attribute__((packed)); |
1505 | 1520 | ||
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 4baf35949b51..ccd31ab815d4 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -3088,7 +3088,8 @@ CIFSSMBQuerySymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
3088 | bool is_unicode; | 3088 | bool is_unicode; |
3089 | unsigned int sub_len; | 3089 | unsigned int sub_len; |
3090 | char *sub_start; | 3090 | char *sub_start; |
3091 | struct reparse_data *reparse_buf; | 3091 | struct reparse_symlink_data *reparse_buf; |
3092 | struct reparse_posix_data *posix_buf; | ||
3092 | __u32 data_offset, data_count; | 3093 | __u32 data_offset, data_count; |
3093 | char *end_of_smb; | 3094 | char *end_of_smb; |
3094 | 3095 | ||
@@ -3137,20 +3138,47 @@ CIFSSMBQuerySymLink(const unsigned int xid, struct cifs_tcon *tcon, | |||
3137 | goto qreparse_out; | 3138 | goto qreparse_out; |
3138 | } | 3139 | } |
3139 | end_of_smb = 2 + get_bcc(&pSMBr->hdr) + (char *)&pSMBr->ByteCount; | 3140 | end_of_smb = 2 + get_bcc(&pSMBr->hdr) + (char *)&pSMBr->ByteCount; |
3140 | reparse_buf = (struct reparse_data *) | 3141 | reparse_buf = (struct reparse_symlink_data *) |
3141 | ((char *)&pSMBr->hdr.Protocol + data_offset); | 3142 | ((char *)&pSMBr->hdr.Protocol + data_offset); |
3142 | if ((char *)reparse_buf >= end_of_smb) { | 3143 | if ((char *)reparse_buf >= end_of_smb) { |
3143 | rc = -EIO; | 3144 | rc = -EIO; |
3144 | goto qreparse_out; | 3145 | goto qreparse_out; |
3145 | } | 3146 | } |
3146 | if ((reparse_buf->PathBuffer + reparse_buf->PrintNameOffset + | 3147 | if (reparse_buf->ReparseTag == cpu_to_le32(IO_REPARSE_TAG_NFS)) { |
3147 | reparse_buf->PrintNameLength) > end_of_smb) { | 3148 | cifs_dbg(FYI, "NFS style reparse tag\n"); |
3149 | posix_buf = (struct reparse_posix_data *)reparse_buf; | ||
3150 | |||
3151 | if (posix_buf->InodeType != cpu_to_le64(NFS_SPECFILE_LNK)) { | ||
3152 | cifs_dbg(FYI, "unsupported file type 0x%llx\n", | ||
3153 | le64_to_cpu(posix_buf->InodeType)); | ||
3154 | rc = -EOPNOTSUPP; | ||
3155 | goto qreparse_out; | ||
3156 | } | ||
3157 | is_unicode = true; | ||
3158 | sub_len = le16_to_cpu(reparse_buf->ReparseDataLength); | ||
3159 | if (posix_buf->PathBuffer + sub_len > end_of_smb) { | ||
3160 | cifs_dbg(FYI, "reparse buf beyond SMB\n"); | ||
3161 | rc = -EIO; | ||
3162 | goto qreparse_out; | ||
3163 | } | ||
3164 | *symlinkinfo = cifs_strndup_from_utf16(posix_buf->PathBuffer, | ||
3165 | sub_len, is_unicode, nls_codepage); | ||
3166 | goto qreparse_out; | ||
3167 | } else if (reparse_buf->ReparseTag != | ||
3168 | cpu_to_le32(IO_REPARSE_TAG_SYMLINK)) { | ||
3169 | rc = -EOPNOTSUPP; | ||
3170 | goto qreparse_out; | ||
3171 | } | ||
3172 | |||
3173 | /* Reparse tag is NTFS symlink */ | ||
3174 | sub_start = le16_to_cpu(reparse_buf->SubstituteNameOffset) + | ||
3175 | reparse_buf->PathBuffer; | ||
3176 | sub_len = le16_to_cpu(reparse_buf->SubstituteNameLength); | ||
3177 | if (sub_start + sub_len > end_of_smb) { | ||
3148 | cifs_dbg(FYI, "reparse buf beyond SMB\n"); | 3178 | cifs_dbg(FYI, "reparse buf beyond SMB\n"); |
3149 | rc = -EIO; | 3179 | rc = -EIO; |
3150 | goto qreparse_out; | 3180 | goto qreparse_out; |
3151 | } | 3181 | } |
3152 | sub_start = reparse_buf->SubstituteNameOffset + reparse_buf->PathBuffer; | ||
3153 | sub_len = reparse_buf->SubstituteNameLength; | ||
3154 | if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) | 3182 | if (pSMBr->hdr.Flags2 & SMBFLG2_UNICODE) |
3155 | is_unicode = true; | 3183 | is_unicode = true; |
3156 | else | 3184 | else |
diff --git a/fs/cifs/netmisc.c b/fs/cifs/netmisc.c index af847e1cf1c1..651a5279607b 100644 --- a/fs/cifs/netmisc.c +++ b/fs/cifs/netmisc.c | |||
@@ -780,7 +780,9 @@ static const struct { | |||
780 | ERRDOS, ERRnoaccess, 0xc0000290}, { | 780 | ERRDOS, ERRnoaccess, 0xc0000290}, { |
781 | ERRDOS, ERRbadfunc, 0xc000029c}, { | 781 | ERRDOS, ERRbadfunc, 0xc000029c}, { |
782 | ERRDOS, ERRsymlink, NT_STATUS_STOPPED_ON_SYMLINK}, { | 782 | ERRDOS, ERRsymlink, NT_STATUS_STOPPED_ON_SYMLINK}, { |
783 | ERRDOS, ERRinvlevel, 0x007c0001}, }; | 783 | ERRDOS, ERRinvlevel, 0x007c0001}, { |
784 | 0, 0, 0 } | ||
785 | }; | ||
784 | 786 | ||
785 | /***************************************************************************** | 787 | /***************************************************************************** |
786 | Print an error message from the status code | 788 | Print an error message from the status code |
diff --git a/fs/cifs/sess.c b/fs/cifs/sess.c index 352358de1d7e..e87387dbf39f 100644 --- a/fs/cifs/sess.c +++ b/fs/cifs/sess.c | |||
@@ -500,9 +500,9 @@ select_sectype(struct TCP_Server_Info *server, enum securityEnum requested) | |||
500 | return NTLMv2; | 500 | return NTLMv2; |
501 | if (global_secflags & CIFSSEC_MAY_NTLM) | 501 | if (global_secflags & CIFSSEC_MAY_NTLM) |
502 | return NTLM; | 502 | return NTLM; |
503 | /* Fallthrough */ | ||
504 | default: | 503 | default: |
505 | return Unspecified; | 504 | /* Fallthrough to attempt LANMAN authentication next */ |
505 | break; | ||
506 | } | 506 | } |
507 | case CIFS_NEGFLAVOR_LANMAN: | 507 | case CIFS_NEGFLAVOR_LANMAN: |
508 | switch (requested) { | 508 | switch (requested) { |
diff --git a/fs/cifs/smb2pdu.c b/fs/cifs/smb2pdu.c index eba0efde66d7..edccb5252462 100644 --- a/fs/cifs/smb2pdu.c +++ b/fs/cifs/smb2pdu.c | |||
@@ -687,6 +687,10 @@ SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) | |||
687 | else | 687 | else |
688 | return -EIO; | 688 | return -EIO; |
689 | 689 | ||
690 | /* no need to send SMB logoff if uid already closed due to reconnect */ | ||
691 | if (ses->need_reconnect) | ||
692 | goto smb2_session_already_dead; | ||
693 | |||
690 | rc = small_smb2_init(SMB2_LOGOFF, NULL, (void **) &req); | 694 | rc = small_smb2_init(SMB2_LOGOFF, NULL, (void **) &req); |
691 | if (rc) | 695 | if (rc) |
692 | return rc; | 696 | return rc; |
@@ -701,6 +705,8 @@ SMB2_logoff(const unsigned int xid, struct cifs_ses *ses) | |||
701 | * No tcon so can't do | 705 | * No tcon so can't do |
702 | * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); | 706 | * cifs_stats_inc(&tcon->stats.smb2_stats.smb2_com_fail[SMB2...]); |
703 | */ | 707 | */ |
708 | |||
709 | smb2_session_already_dead: | ||
704 | return rc; | 710 | return rc; |
705 | } | 711 | } |
706 | 712 | ||
diff --git a/fs/cifs/smbfsctl.h b/fs/cifs/smbfsctl.h index d952ee48f4dc..a4b2391fe66e 100644 --- a/fs/cifs/smbfsctl.h +++ b/fs/cifs/smbfsctl.h | |||
@@ -97,9 +97,23 @@ | |||
97 | #define FSCTL_QUERY_NETWORK_INTERFACE_INFO 0x001401FC /* BB add struct */ | 97 | #define FSCTL_QUERY_NETWORK_INTERFACE_INFO 0x001401FC /* BB add struct */ |
98 | #define FSCTL_SRV_READ_HASH 0x001441BB /* BB add struct */ | 98 | #define FSCTL_SRV_READ_HASH 0x001441BB /* BB add struct */ |
99 | 99 | ||
100 | /* See FSCC 2.1.2.5 */ | ||
100 | #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 | 101 | #define IO_REPARSE_TAG_MOUNT_POINT 0xA0000003 |
101 | #define IO_REPARSE_TAG_HSM 0xC0000004 | 102 | #define IO_REPARSE_TAG_HSM 0xC0000004 |
102 | #define IO_REPARSE_TAG_SIS 0x80000007 | 103 | #define IO_REPARSE_TAG_SIS 0x80000007 |
104 | #define IO_REPARSE_TAG_HSM2 0x80000006 | ||
105 | #define IO_REPARSE_TAG_DRIVER_EXTENDER 0x80000005 | ||
106 | /* Used by the DFS filter. See MS-DFSC */ | ||
107 | #define IO_REPARSE_TAG_DFS 0x8000000A | ||
108 | /* Used by the DFS filter See MS-DFSC */ | ||
109 | #define IO_REPARSE_TAG_DFSR 0x80000012 | ||
110 | #define IO_REPARSE_TAG_FILTER_MANAGER 0x8000000B | ||
111 | /* See section MS-FSCC 2.1.2.4 */ | ||
112 | #define IO_REPARSE_TAG_SYMLINK 0xA000000C | ||
113 | #define IO_REPARSE_TAG_DEDUP 0x80000013 | ||
114 | #define IO_REPARSE_APPXSTREAM 0xC0000014 | ||
115 | /* NFS symlinks, Win 8/SMB3 and later */ | ||
116 | #define IO_REPARSE_TAG_NFS 0x80000014 | ||
103 | 117 | ||
104 | /* fsctl flags */ | 118 | /* fsctl flags */ |
105 | /* If Flags is set to this value, the request is an FSCTL not ioctl request */ | 119 | /* If Flags is set to this value, the request is an FSCTL not ioctl request */ |
diff --git a/fs/cifs/transport.c b/fs/cifs/transport.c index 6fdcb1b4a106..800b938e4061 100644 --- a/fs/cifs/transport.c +++ b/fs/cifs/transport.c | |||
@@ -410,8 +410,13 @@ static int | |||
410 | wait_for_free_request(struct TCP_Server_Info *server, const int timeout, | 410 | wait_for_free_request(struct TCP_Server_Info *server, const int timeout, |
411 | const int optype) | 411 | const int optype) |
412 | { | 412 | { |
413 | return wait_for_free_credits(server, timeout, | 413 | int *val; |
414 | server->ops->get_credits_field(server, optype)); | 414 | |
415 | val = server->ops->get_credits_field(server, optype); | ||
416 | /* Since an echo is already inflight, no need to wait to send another */ | ||
417 | if (*val <= 0 && optype == CIFS_ECHO_OP) | ||
418 | return -EAGAIN; | ||
419 | return wait_for_free_credits(server, timeout, val); | ||
415 | } | 420 | } |
416 | 421 | ||
417 | static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, | 422 | static int allocate_mid(struct cifs_ses *ses, struct smb_hdr *in_buf, |
diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c index 1194b1f0f839..f8cde46de9cd 100644 --- a/fs/ext3/namei.c +++ b/fs/ext3/namei.c | |||
@@ -1783,7 +1783,7 @@ retry: | |||
1783 | d_tmpfile(dentry, inode); | 1783 | d_tmpfile(dentry, inode); |
1784 | err = ext3_orphan_add(handle, inode); | 1784 | err = ext3_orphan_add(handle, inode); |
1785 | if (err) | 1785 | if (err) |
1786 | goto err_drop_inode; | 1786 | goto err_unlock_inode; |
1787 | mark_inode_dirty(inode); | 1787 | mark_inode_dirty(inode); |
1788 | unlock_new_inode(inode); | 1788 | unlock_new_inode(inode); |
1789 | } | 1789 | } |
@@ -1791,10 +1791,9 @@ retry: | |||
1791 | if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) | 1791 | if (err == -ENOSPC && ext3_should_retry_alloc(dir->i_sb, &retries)) |
1792 | goto retry; | 1792 | goto retry; |
1793 | return err; | 1793 | return err; |
1794 | err_drop_inode: | 1794 | err_unlock_inode: |
1795 | ext3_journal_stop(handle); | 1795 | ext3_journal_stop(handle); |
1796 | unlock_new_inode(inode); | 1796 | unlock_new_inode(inode); |
1797 | iput(inode); | ||
1798 | return err; | 1797 | return err; |
1799 | } | 1798 | } |
1800 | 1799 | ||
diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index 1bec5a5c1e45..5a0408d7b114 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c | |||
@@ -2319,7 +2319,7 @@ retry: | |||
2319 | d_tmpfile(dentry, inode); | 2319 | d_tmpfile(dentry, inode); |
2320 | err = ext4_orphan_add(handle, inode); | 2320 | err = ext4_orphan_add(handle, inode); |
2321 | if (err) | 2321 | if (err) |
2322 | goto err_drop_inode; | 2322 | goto err_unlock_inode; |
2323 | mark_inode_dirty(inode); | 2323 | mark_inode_dirty(inode); |
2324 | unlock_new_inode(inode); | 2324 | unlock_new_inode(inode); |
2325 | } | 2325 | } |
@@ -2328,10 +2328,9 @@ retry: | |||
2328 | if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) | 2328 | if (err == -ENOSPC && ext4_should_retry_alloc(dir->i_sb, &retries)) |
2329 | goto retry; | 2329 | goto retry; |
2330 | return err; | 2330 | return err; |
2331 | err_drop_inode: | 2331 | err_unlock_inode: |
2332 | ext4_journal_stop(handle); | 2332 | ext4_journal_stop(handle); |
2333 | unlock_new_inode(inode); | 2333 | unlock_new_inode(inode); |
2334 | iput(inode); | ||
2335 | return err; | 2334 | return err; |
2336 | } | 2335 | } |
2337 | 2336 | ||
diff --git a/fs/proc/inode.c b/fs/proc/inode.c index 9f8ef9b7674d..8eaa1ba793fc 100644 --- a/fs/proc/inode.c +++ b/fs/proc/inode.c | |||
@@ -288,10 +288,14 @@ static int proc_reg_mmap(struct file *file, struct vm_area_struct *vma) | |||
288 | static unsigned long proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) | 288 | static unsigned long proc_reg_get_unmapped_area(struct file *file, unsigned long orig_addr, unsigned long len, unsigned long pgoff, unsigned long flags) |
289 | { | 289 | { |
290 | struct proc_dir_entry *pde = PDE(file_inode(file)); | 290 | struct proc_dir_entry *pde = PDE(file_inode(file)); |
291 | int rv = -EIO; | 291 | unsigned long rv = -EIO; |
292 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long); | 292 | unsigned long (*get_unmapped_area)(struct file *, unsigned long, unsigned long, unsigned long, unsigned long) = NULL; |
293 | if (use_pde(pde)) { | 293 | if (use_pde(pde)) { |
294 | get_unmapped_area = pde->proc_fops->get_unmapped_area; | 294 | #ifdef CONFIG_MMU |
295 | get_unmapped_area = current->mm->get_unmapped_area; | ||
296 | #endif | ||
297 | if (pde->proc_fops->get_unmapped_area) | ||
298 | get_unmapped_area = pde->proc_fops->get_unmapped_area; | ||
295 | if (get_unmapped_area) | 299 | if (get_unmapped_area) |
296 | rv = get_unmapped_area(file, orig_addr, len, pgoff, flags); | 300 | rv = get_unmapped_area(file, orig_addr, len, pgoff, flags); |
297 | unuse_pde(pde); | 301 | unuse_pde(pde); |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 7366e9d63cee..390bdab01c3c 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -941,6 +941,8 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, struct pagemapread *pm, | |||
941 | frame = pte_pfn(pte); | 941 | frame = pte_pfn(pte); |
942 | flags = PM_PRESENT; | 942 | flags = PM_PRESENT; |
943 | page = vm_normal_page(vma, addr, pte); | 943 | page = vm_normal_page(vma, addr, pte); |
944 | if (pte_soft_dirty(pte)) | ||
945 | flags2 |= __PM_SOFT_DIRTY; | ||
944 | } else if (is_swap_pte(pte)) { | 946 | } else if (is_swap_pte(pte)) { |
945 | swp_entry_t entry; | 947 | swp_entry_t entry; |
946 | if (pte_swp_soft_dirty(pte)) | 948 | if (pte_swp_soft_dirty(pte)) |
@@ -960,7 +962,7 @@ static void pte_to_pagemap_entry(pagemap_entry_t *pme, struct pagemapread *pm, | |||
960 | 962 | ||
961 | if (page && !PageAnon(page)) | 963 | if (page && !PageAnon(page)) |
962 | flags |= PM_FILE; | 964 | flags |= PM_FILE; |
963 | if ((vma->vm_flags & VM_SOFTDIRTY) || pte_soft_dirty(pte)) | 965 | if ((vma->vm_flags & VM_SOFTDIRTY)) |
964 | flags2 |= __PM_SOFT_DIRTY; | 966 | flags2 |= __PM_SOFT_DIRTY; |
965 | 967 | ||
966 | *pme = make_pme(PM_PFRAME(frame) | PM_STATUS2(pm->v2, flags2) | flags); | 968 | *pme = make_pme(PM_PFRAME(frame) | PM_STATUS2(pm->v2, flags2) | flags); |