diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cachefiles/internal.h | 18 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 2 | ||||
-rw-r--r-- | fs/cifs/dir.c | 51 | ||||
-rw-r--r-- | fs/cifs/file.c | 66 | ||||
-rw-r--r-- | fs/cifs/link.c | 52 | ||||
-rw-r--r-- | fs/fscache/internal.h | 18 | ||||
-rw-r--r-- | fs/nfs/dir.c | 3 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 9 | ||||
-rw-r--r-- | fs/nfs/nfsroot.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/ioctl.c | 2 |
10 files changed, 117 insertions, 106 deletions
diff --git a/fs/cachefiles/internal.h b/fs/cachefiles/internal.h index 19218e1463d6..f7c255f9c624 100644 --- a/fs/cachefiles/internal.h +++ b/fs/cachefiles/internal.h | |||
@@ -122,13 +122,13 @@ static inline void cachefiles_state_changed(struct cachefiles_cache *cache) | |||
122 | } | 122 | } |
123 | 123 | ||
124 | /* | 124 | /* |
125 | * cf-bind.c | 125 | * bind.c |
126 | */ | 126 | */ |
127 | extern int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args); | 127 | extern int cachefiles_daemon_bind(struct cachefiles_cache *cache, char *args); |
128 | extern void cachefiles_daemon_unbind(struct cachefiles_cache *cache); | 128 | extern void cachefiles_daemon_unbind(struct cachefiles_cache *cache); |
129 | 129 | ||
130 | /* | 130 | /* |
131 | * cf-daemon.c | 131 | * daemon.c |
132 | */ | 132 | */ |
133 | extern const struct file_operations cachefiles_daemon_fops; | 133 | extern const struct file_operations cachefiles_daemon_fops; |
134 | 134 | ||
@@ -136,17 +136,17 @@ extern int cachefiles_has_space(struct cachefiles_cache *cache, | |||
136 | unsigned fnr, unsigned bnr); | 136 | unsigned fnr, unsigned bnr); |
137 | 137 | ||
138 | /* | 138 | /* |
139 | * cf-interface.c | 139 | * interface.c |
140 | */ | 140 | */ |
141 | extern const struct fscache_cache_ops cachefiles_cache_ops; | 141 | extern const struct fscache_cache_ops cachefiles_cache_ops; |
142 | 142 | ||
143 | /* | 143 | /* |
144 | * cf-key.c | 144 | * key.c |
145 | */ | 145 | */ |
146 | extern char *cachefiles_cook_key(const u8 *raw, int keylen, uint8_t type); | 146 | extern char *cachefiles_cook_key(const u8 *raw, int keylen, uint8_t type); |
147 | 147 | ||
148 | /* | 148 | /* |
149 | * cf-namei.c | 149 | * namei.c |
150 | */ | 150 | */ |
151 | extern int cachefiles_delete_object(struct cachefiles_cache *cache, | 151 | extern int cachefiles_delete_object(struct cachefiles_cache *cache, |
152 | struct cachefiles_object *object); | 152 | struct cachefiles_object *object); |
@@ -165,7 +165,7 @@ extern int cachefiles_check_in_use(struct cachefiles_cache *cache, | |||
165 | struct dentry *dir, char *filename); | 165 | struct dentry *dir, char *filename); |
166 | 166 | ||
167 | /* | 167 | /* |
168 | * cf-proc.c | 168 | * proc.c |
169 | */ | 169 | */ |
170 | #ifdef CONFIG_CACHEFILES_HISTOGRAM | 170 | #ifdef CONFIG_CACHEFILES_HISTOGRAM |
171 | extern atomic_t cachefiles_lookup_histogram[HZ]; | 171 | extern atomic_t cachefiles_lookup_histogram[HZ]; |
@@ -190,7 +190,7 @@ void cachefiles_hist(atomic_t histogram[], unsigned long start_jif) | |||
190 | #endif | 190 | #endif |
191 | 191 | ||
192 | /* | 192 | /* |
193 | * cf-rdwr.c | 193 | * rdwr.c |
194 | */ | 194 | */ |
195 | extern int cachefiles_read_or_alloc_page(struct fscache_retrieval *, | 195 | extern int cachefiles_read_or_alloc_page(struct fscache_retrieval *, |
196 | struct page *, gfp_t); | 196 | struct page *, gfp_t); |
@@ -205,7 +205,7 @@ extern int cachefiles_write_page(struct fscache_storage *, struct page *); | |||
205 | extern void cachefiles_uncache_page(struct fscache_object *, struct page *); | 205 | extern void cachefiles_uncache_page(struct fscache_object *, struct page *); |
206 | 206 | ||
207 | /* | 207 | /* |
208 | * cf-security.c | 208 | * security.c |
209 | */ | 209 | */ |
210 | extern int cachefiles_get_security_ID(struct cachefiles_cache *cache); | 210 | extern int cachefiles_get_security_ID(struct cachefiles_cache *cache); |
211 | extern int cachefiles_determine_cache_security(struct cachefiles_cache *cache, | 211 | extern int cachefiles_determine_cache_security(struct cachefiles_cache *cache, |
@@ -225,7 +225,7 @@ static inline void cachefiles_end_secure(struct cachefiles_cache *cache, | |||
225 | } | 225 | } |
226 | 226 | ||
227 | /* | 227 | /* |
228 | * cf-xattr.c | 228 | * xattr.c |
229 | */ | 229 | */ |
230 | extern int cachefiles_check_object_type(struct cachefiles_object *object); | 230 | extern int cachefiles_check_object_type(struct cachefiles_object *object); |
231 | extern int cachefiles_set_object_xattr(struct cachefiles_object *object, | 231 | extern int cachefiles_set_object_xattr(struct cachefiles_object *object, |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 5759ba53dc96..d06260251c30 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2475,7 +2475,7 @@ querySymLinkRetry: | |||
2475 | /* BB FIXME investigate remapping reserved chars here */ | 2475 | /* BB FIXME investigate remapping reserved chars here */ |
2476 | *symlinkinfo = cifs_strndup_from_ucs(data_start, count, | 2476 | *symlinkinfo = cifs_strndup_from_ucs(data_start, count, |
2477 | is_unicode, nls_codepage); | 2477 | is_unicode, nls_codepage); |
2478 | if (!symlinkinfo) | 2478 | if (!*symlinkinfo) |
2479 | rc = -ENOMEM; | 2479 | rc = -ENOMEM; |
2480 | } | 2480 | } |
2481 | } | 2481 | } |
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 11431ed72a7f..3758965d73d5 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -225,6 +225,7 @@ int cifs_posix_open(char *full_path, struct inode **pinode, | |||
225 | if (!(oflags & FMODE_READ)) | 225 | if (!(oflags & FMODE_READ)) |
226 | write_only = true; | 226 | write_only = true; |
227 | 227 | ||
228 | mode &= ~current_umask(); | ||
228 | rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, | 229 | rc = CIFSPOSIXCreate(xid, cifs_sb->tcon, posix_flags, mode, |
229 | pnetfid, presp_data, &oplock, full_path, | 230 | pnetfid, presp_data, &oplock, full_path, |
230 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & | 231 | cifs_sb->local_nls, cifs_sb->mnt_cifs_flags & |
@@ -310,7 +311,6 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
310 | return -ENOMEM; | 311 | return -ENOMEM; |
311 | } | 312 | } |
312 | 313 | ||
313 | mode &= ~current_umask(); | ||
314 | if (oplockEnabled) | 314 | if (oplockEnabled) |
315 | oplock = REQ_OPLOCK; | 315 | oplock = REQ_OPLOCK; |
316 | 316 | ||
@@ -336,7 +336,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
336 | else /* success, no need to query */ | 336 | else /* success, no need to query */ |
337 | goto cifs_create_set_dentry; | 337 | goto cifs_create_set_dentry; |
338 | } else if ((rc != -EIO) && (rc != -EREMOTE) && | 338 | } else if ((rc != -EIO) && (rc != -EREMOTE) && |
339 | (rc != -EOPNOTSUPP)) /* path not found or net err */ | 339 | (rc != -EOPNOTSUPP) && (rc != -EINVAL)) |
340 | goto cifs_create_out; | 340 | goto cifs_create_out; |
341 | /* else fallthrough to retry, using older open call, this is | 341 | /* else fallthrough to retry, using older open call, this is |
342 | case where server does not support this SMB level, and | 342 | case where server does not support this SMB level, and |
@@ -609,7 +609,6 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
609 | int xid; | 609 | int xid; |
610 | int rc = 0; /* to get around spurious gcc warning, set to zero here */ | 610 | int rc = 0; /* to get around spurious gcc warning, set to zero here */ |
611 | int oplock = 0; | 611 | int oplock = 0; |
612 | int mode; | ||
613 | __u16 fileHandle = 0; | 612 | __u16 fileHandle = 0; |
614 | bool posix_open = false; | 613 | bool posix_open = false; |
615 | struct cifs_sb_info *cifs_sb; | 614 | struct cifs_sb_info *cifs_sb; |
@@ -658,30 +657,36 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry, | |||
658 | } | 657 | } |
659 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, direntry->d_inode)); | 658 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, direntry->d_inode)); |
660 | 659 | ||
660 | /* Posix open is only called (at lookup time) for file create now. | ||
661 | * For opens (rather than creates), because we do not know if it | ||
662 | * is a file or directory yet, and current Samba no longer allows | ||
663 | * us to do posix open on dirs, we could end up wasting an open call | ||
664 | * on what turns out to be a dir. For file opens, we wait to call posix | ||
665 | * open till cifs_open. It could be added here (lookup) in the future | ||
666 | * but the performance tradeoff of the extra network request when EISDIR | ||
667 | * or EACCES is returned would have to be weighed against the 50% | ||
668 | * reduction in network traffic in the other paths. | ||
669 | */ | ||
661 | if (pTcon->unix_ext) { | 670 | if (pTcon->unix_ext) { |
662 | if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY)) && | 671 | if (!(nd->flags & (LOOKUP_PARENT | LOOKUP_DIRECTORY)) && |
663 | (nd->flags & LOOKUP_OPEN)) { | 672 | (nd->flags & LOOKUP_OPEN) && !pTcon->broken_posix_open && |
664 | if (!((nd->intent.open.flags & O_CREAT) && | 673 | (nd->intent.open.flags & O_CREAT)) { |
665 | (nd->intent.open.flags & O_EXCL))) { | 674 | rc = cifs_posix_open(full_path, &newInode, |
666 | mode = nd->intent.open.create_mode & | 675 | parent_dir_inode->i_sb, |
667 | ~current_umask(); | 676 | nd->intent.open.create_mode, |
668 | rc = cifs_posix_open(full_path, &newInode, | ||
669 | parent_dir_inode->i_sb, mode, | ||
670 | nd->intent.open.flags, &oplock, | 677 | nd->intent.open.flags, &oplock, |
671 | &fileHandle, xid); | 678 | &fileHandle, xid); |
672 | /* | 679 | /* |
673 | * This code works around a bug in | 680 | * The check below works around a bug in POSIX |
674 | * samba posix open in samba versions 3.3.1 | 681 | * open in samba versions 3.3.1 and earlier where |
675 | * and earlier where create works | 682 | * open could incorrectly fail with invalid parameter. |
676 | * but open fails with invalid parameter. | 683 | * If either that or op not supported returned, follow |
677 | * If either of these error codes are | 684 | * the normal lookup. |
678 | * returned, follow the normal lookup. | 685 | */ |
679 | * Otherwise, the error during posix open | 686 | if ((rc == 0) || (rc == -ENOENT)) |
680 | * is handled. | 687 | posix_open = true; |
681 | */ | 688 | else if ((rc == -EINVAL) || (rc != -EOPNOTSUPP)) |
682 | if ((rc != -EINVAL) && (rc != -EOPNOTSUPP)) | 689 | pTcon->broken_posix_open = true; |
683 | posix_open = true; | ||
684 | } | ||
685 | } | 690 | } |
686 | if (!posix_open) | 691 | if (!posix_open) |
687 | rc = cifs_get_inode_info_unix(&newInode, full_path, | 692 | rc = cifs_get_inode_info_unix(&newInode, full_path, |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 38c06f826575..302ea15f02e6 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -130,10 +130,6 @@ static inline int cifs_posix_open_inode_helper(struct inode *inode, | |||
130 | struct cifsFileInfo *pCifsFile, int oplock, u16 netfid) | 130 | struct cifsFileInfo *pCifsFile, int oplock, u16 netfid) |
131 | { | 131 | { |
132 | 132 | ||
133 | file->private_data = kmalloc(sizeof(struct cifsFileInfo), GFP_KERNEL); | ||
134 | if (file->private_data == NULL) | ||
135 | return -ENOMEM; | ||
136 | pCifsFile = cifs_init_private(file->private_data, inode, file, netfid); | ||
137 | write_lock(&GlobalSMBSeslock); | 133 | write_lock(&GlobalSMBSeslock); |
138 | 134 | ||
139 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | 135 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); |
@@ -184,6 +180,38 @@ psx_client_can_cache: | |||
184 | return 0; | 180 | return 0; |
185 | } | 181 | } |
186 | 182 | ||
183 | static struct cifsFileInfo * | ||
184 | cifs_fill_filedata(struct file *file) | ||
185 | { | ||
186 | struct list_head *tmp; | ||
187 | struct cifsFileInfo *pCifsFile = NULL; | ||
188 | struct cifsInodeInfo *pCifsInode = NULL; | ||
189 | |||
190 | /* search inode for this file and fill in file->private_data */ | ||
191 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | ||
192 | read_lock(&GlobalSMBSeslock); | ||
193 | list_for_each(tmp, &pCifsInode->openFileList) { | ||
194 | pCifsFile = list_entry(tmp, struct cifsFileInfo, flist); | ||
195 | if ((pCifsFile->pfile == NULL) && | ||
196 | (pCifsFile->pid == current->tgid)) { | ||
197 | /* mode set in cifs_create */ | ||
198 | |||
199 | /* needed for writepage */ | ||
200 | pCifsFile->pfile = file; | ||
201 | file->private_data = pCifsFile; | ||
202 | break; | ||
203 | } | ||
204 | } | ||
205 | read_unlock(&GlobalSMBSeslock); | ||
206 | |||
207 | if (file->private_data != NULL) { | ||
208 | return pCifsFile; | ||
209 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) | ||
210 | cERROR(1, ("could not find file instance for " | ||
211 | "new file %p", file)); | ||
212 | return NULL; | ||
213 | } | ||
214 | |||
187 | /* all arguments to this function must be checked for validity in caller */ | 215 | /* all arguments to this function must be checked for validity in caller */ |
188 | static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, | 216 | static inline int cifs_open_inode_helper(struct inode *inode, struct file *file, |
189 | struct cifsInodeInfo *pCifsInode, struct cifsFileInfo *pCifsFile, | 217 | struct cifsInodeInfo *pCifsInode, struct cifsFileInfo *pCifsFile, |
@@ -258,7 +286,6 @@ int cifs_open(struct inode *inode, struct file *file) | |||
258 | struct cifsTconInfo *tcon; | 286 | struct cifsTconInfo *tcon; |
259 | struct cifsFileInfo *pCifsFile; | 287 | struct cifsFileInfo *pCifsFile; |
260 | struct cifsInodeInfo *pCifsInode; | 288 | struct cifsInodeInfo *pCifsInode; |
261 | struct list_head *tmp; | ||
262 | char *full_path = NULL; | 289 | char *full_path = NULL; |
263 | int desiredAccess; | 290 | int desiredAccess; |
264 | int disposition; | 291 | int disposition; |
@@ -270,32 +297,12 @@ int cifs_open(struct inode *inode, struct file *file) | |||
270 | cifs_sb = CIFS_SB(inode->i_sb); | 297 | cifs_sb = CIFS_SB(inode->i_sb); |
271 | tcon = cifs_sb->tcon; | 298 | tcon = cifs_sb->tcon; |
272 | 299 | ||
273 | /* search inode for this file and fill in file->private_data */ | ||
274 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); | 300 | pCifsInode = CIFS_I(file->f_path.dentry->d_inode); |
275 | read_lock(&GlobalSMBSeslock); | 301 | pCifsFile = cifs_fill_filedata(file); |
276 | list_for_each(tmp, &pCifsInode->openFileList) { | 302 | if (pCifsFile) { |
277 | pCifsFile = list_entry(tmp, struct cifsFileInfo, | ||
278 | flist); | ||
279 | if ((pCifsFile->pfile == NULL) && | ||
280 | (pCifsFile->pid == current->tgid)) { | ||
281 | /* mode set in cifs_create */ | ||
282 | |||
283 | /* needed for writepage */ | ||
284 | pCifsFile->pfile = file; | ||
285 | |||
286 | file->private_data = pCifsFile; | ||
287 | break; | ||
288 | } | ||
289 | } | ||
290 | read_unlock(&GlobalSMBSeslock); | ||
291 | |||
292 | if (file->private_data != NULL) { | ||
293 | rc = 0; | ||
294 | FreeXid(xid); | 303 | FreeXid(xid); |
295 | return rc; | 304 | return 0; |
296 | } else if ((file->f_flags & O_CREAT) && (file->f_flags & O_EXCL)) | 305 | } |
297 | cERROR(1, ("could not find file instance for " | ||
298 | "new file %p", file)); | ||
299 | 306 | ||
300 | full_path = build_path_from_dentry(file->f_path.dentry); | 307 | full_path = build_path_from_dentry(file->f_path.dentry); |
301 | if (full_path == NULL) { | 308 | if (full_path == NULL) { |
@@ -325,6 +332,7 @@ int cifs_open(struct inode *inode, struct file *file) | |||
325 | /* no need for special case handling of setting mode | 332 | /* no need for special case handling of setting mode |
326 | on read only files needed here */ | 333 | on read only files needed here */ |
327 | 334 | ||
335 | pCifsFile = cifs_fill_filedata(file); | ||
328 | cifs_posix_open_inode_helper(inode, file, pCifsInode, | 336 | cifs_posix_open_inode_helper(inode, file, pCifsInode, |
329 | pCifsFile, oplock, netfid); | 337 | pCifsFile, oplock, netfid); |
330 | goto out; | 338 | goto out; |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index ea9d11e3dcbb..cd83c53fcbb5 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -107,48 +107,48 @@ void * | |||
107 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) | 107 | cifs_follow_link(struct dentry *direntry, struct nameidata *nd) |
108 | { | 108 | { |
109 | struct inode *inode = direntry->d_inode; | 109 | struct inode *inode = direntry->d_inode; |
110 | int rc = -EACCES; | 110 | int rc = -ENOMEM; |
111 | int xid; | 111 | int xid; |
112 | char *full_path = NULL; | 112 | char *full_path = NULL; |
113 | char *target_path = ERR_PTR(-ENOMEM); | 113 | char *target_path = NULL; |
114 | struct cifs_sb_info *cifs_sb; | 114 | struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); |
115 | struct cifsTconInfo *pTcon; | 115 | struct cifsTconInfo *tcon = cifs_sb->tcon; |
116 | 116 | ||
117 | xid = GetXid(); | 117 | xid = GetXid(); |
118 | 118 | ||
119 | full_path = build_path_from_dentry(direntry); | 119 | /* |
120 | * For now, we just handle symlinks with unix extensions enabled. | ||
121 | * Eventually we should handle NTFS reparse points, and MacOS | ||
122 | * symlink support. For instance... | ||
123 | * | ||
124 | * rc = CIFSSMBQueryReparseLinkInfo(...) | ||
125 | * | ||
126 | * For now, just return -EACCES when the server doesn't support posix | ||
127 | * extensions. Note that we still allow querying symlinks when posix | ||
128 | * extensions are manually disabled. We could disable these as well | ||
129 | * but there doesn't seem to be any harm in allowing the client to | ||
130 | * read them. | ||
131 | */ | ||
132 | if (!(tcon->ses->capabilities & CAP_UNIX)) { | ||
133 | rc = -EACCES; | ||
134 | goto out; | ||
135 | } | ||
120 | 136 | ||
137 | full_path = build_path_from_dentry(direntry); | ||
121 | if (!full_path) | 138 | if (!full_path) |
122 | goto out; | 139 | goto out; |
123 | 140 | ||
124 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); | 141 | cFYI(1, ("Full path: %s inode = 0x%p", full_path, inode)); |
125 | cifs_sb = CIFS_SB(inode->i_sb); | ||
126 | pTcon = cifs_sb->tcon; | ||
127 | |||
128 | /* We could change this to: | ||
129 | if (pTcon->unix_ext) | ||
130 | but there does not seem any point in refusing to | ||
131 | get symlink info if we can, even if unix extensions | ||
132 | turned off for this mount */ | ||
133 | |||
134 | if (pTcon->ses->capabilities & CAP_UNIX) | ||
135 | rc = CIFSSMBUnixQuerySymLink(xid, pTcon, full_path, | ||
136 | &target_path, | ||
137 | cifs_sb->local_nls); | ||
138 | else { | ||
139 | /* BB add read reparse point symlink code here */ | ||
140 | /* rc = CIFSSMBQueryReparseLinkInfo */ | ||
141 | /* BB Add code to Query ReparsePoint info */ | ||
142 | /* BB Add MAC style xsymlink check here if enabled */ | ||
143 | } | ||
144 | 142 | ||
143 | rc = CIFSSMBUnixQuerySymLink(xid, tcon, full_path, &target_path, | ||
144 | cifs_sb->local_nls); | ||
145 | kfree(full_path); | ||
146 | out: | ||
145 | if (rc != 0) { | 147 | if (rc != 0) { |
146 | kfree(target_path); | 148 | kfree(target_path); |
147 | target_path = ERR_PTR(rc); | 149 | target_path = ERR_PTR(rc); |
148 | } | 150 | } |
149 | 151 | ||
150 | kfree(full_path); | ||
151 | out: | ||
152 | FreeXid(xid); | 152 | FreeXid(xid); |
153 | nd_set_link(nd, target_path); | 153 | nd_set_link(nd, target_path); |
154 | return NULL; | 154 | return NULL; |
diff --git a/fs/fscache/internal.h b/fs/fscache/internal.h index e0cbd16f6dc9..1c341304621f 100644 --- a/fs/fscache/internal.h +++ b/fs/fscache/internal.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #define FSCACHE_MAX_THREADS 32 | 28 | #define FSCACHE_MAX_THREADS 32 |
29 | 29 | ||
30 | /* | 30 | /* |
31 | * fsc-cache.c | 31 | * cache.c |
32 | */ | 32 | */ |
33 | extern struct list_head fscache_cache_list; | 33 | extern struct list_head fscache_cache_list; |
34 | extern struct rw_semaphore fscache_addremove_sem; | 34 | extern struct rw_semaphore fscache_addremove_sem; |
@@ -37,7 +37,7 @@ extern struct fscache_cache *fscache_select_cache_for_object( | |||
37 | struct fscache_cookie *); | 37 | struct fscache_cookie *); |
38 | 38 | ||
39 | /* | 39 | /* |
40 | * fsc-cookie.c | 40 | * cookie.c |
41 | */ | 41 | */ |
42 | extern struct kmem_cache *fscache_cookie_jar; | 42 | extern struct kmem_cache *fscache_cookie_jar; |
43 | 43 | ||
@@ -45,13 +45,13 @@ extern void fscache_cookie_init_once(void *); | |||
45 | extern void __fscache_cookie_put(struct fscache_cookie *); | 45 | extern void __fscache_cookie_put(struct fscache_cookie *); |
46 | 46 | ||
47 | /* | 47 | /* |
48 | * fsc-fsdef.c | 48 | * fsdef.c |
49 | */ | 49 | */ |
50 | extern struct fscache_cookie fscache_fsdef_index; | 50 | extern struct fscache_cookie fscache_fsdef_index; |
51 | extern struct fscache_cookie_def fscache_fsdef_netfs_def; | 51 | extern struct fscache_cookie_def fscache_fsdef_netfs_def; |
52 | 52 | ||
53 | /* | 53 | /* |
54 | * fsc-histogram.c | 54 | * histogram.c |
55 | */ | 55 | */ |
56 | #ifdef CONFIG_FSCACHE_HISTOGRAM | 56 | #ifdef CONFIG_FSCACHE_HISTOGRAM |
57 | extern atomic_t fscache_obj_instantiate_histogram[HZ]; | 57 | extern atomic_t fscache_obj_instantiate_histogram[HZ]; |
@@ -75,7 +75,7 @@ extern const struct file_operations fscache_histogram_fops; | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | /* | 77 | /* |
78 | * fsc-main.c | 78 | * main.c |
79 | */ | 79 | */ |
80 | extern unsigned fscache_defer_lookup; | 80 | extern unsigned fscache_defer_lookup; |
81 | extern unsigned fscache_defer_create; | 81 | extern unsigned fscache_defer_create; |
@@ -86,14 +86,14 @@ extern int fscache_wait_bit(void *); | |||
86 | extern int fscache_wait_bit_interruptible(void *); | 86 | extern int fscache_wait_bit_interruptible(void *); |
87 | 87 | ||
88 | /* | 88 | /* |
89 | * fsc-object.c | 89 | * object.c |
90 | */ | 90 | */ |
91 | extern void fscache_withdrawing_object(struct fscache_cache *, | 91 | extern void fscache_withdrawing_object(struct fscache_cache *, |
92 | struct fscache_object *); | 92 | struct fscache_object *); |
93 | extern void fscache_enqueue_object(struct fscache_object *); | 93 | extern void fscache_enqueue_object(struct fscache_object *); |
94 | 94 | ||
95 | /* | 95 | /* |
96 | * fsc-operation.c | 96 | * operation.c |
97 | */ | 97 | */ |
98 | extern int fscache_submit_exclusive_op(struct fscache_object *, | 98 | extern int fscache_submit_exclusive_op(struct fscache_object *, |
99 | struct fscache_operation *); | 99 | struct fscache_operation *); |
@@ -104,7 +104,7 @@ extern void fscache_start_operations(struct fscache_object *); | |||
104 | extern void fscache_operation_gc(struct work_struct *); | 104 | extern void fscache_operation_gc(struct work_struct *); |
105 | 105 | ||
106 | /* | 106 | /* |
107 | * fsc-proc.c | 107 | * proc.c |
108 | */ | 108 | */ |
109 | #ifdef CONFIG_PROC_FS | 109 | #ifdef CONFIG_PROC_FS |
110 | extern int __init fscache_proc_init(void); | 110 | extern int __init fscache_proc_init(void); |
@@ -115,7 +115,7 @@ extern void fscache_proc_cleanup(void); | |||
115 | #endif | 115 | #endif |
116 | 116 | ||
117 | /* | 117 | /* |
118 | * fsc-stats.c | 118 | * stats.c |
119 | */ | 119 | */ |
120 | #ifdef CONFIG_FSCACHE_STATS | 120 | #ifdef CONFIG_FSCACHE_STATS |
121 | extern atomic_t fscache_n_ops_processed[FSCACHE_MAX_THREADS]; | 121 | extern atomic_t fscache_n_ops_processed[FSCACHE_MAX_THREADS]; |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 370b190a09d1..89f98e9a024b 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -1943,7 +1943,8 @@ int nfs_permission(struct inode *inode, int mask) | |||
1943 | case S_IFREG: | 1943 | case S_IFREG: |
1944 | /* NFSv4 has atomic_open... */ | 1944 | /* NFSv4 has atomic_open... */ |
1945 | if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN) | 1945 | if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN) |
1946 | && (mask & MAY_OPEN)) | 1946 | && (mask & MAY_OPEN) |
1947 | && !(mask & MAY_EXEC)) | ||
1947 | goto out; | 1948 | goto out; |
1948 | break; | 1949 | break; |
1949 | case S_IFDIR: | 1950 | case S_IFDIR: |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index a4d242680299..4674f8092da8 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -2594,12 +2594,9 @@ static void nfs4_renew_done(struct rpc_task *task, void *data) | |||
2594 | unsigned long timestamp = (unsigned long)data; | 2594 | unsigned long timestamp = (unsigned long)data; |
2595 | 2595 | ||
2596 | if (task->tk_status < 0) { | 2596 | if (task->tk_status < 0) { |
2597 | switch (task->tk_status) { | 2597 | /* Unless we're shutting down, schedule state recovery! */ |
2598 | case -NFS4ERR_STALE_CLIENTID: | 2598 | if (test_bit(NFS_CS_RENEWD, &clp->cl_res_state) != 0) |
2599 | case -NFS4ERR_EXPIRED: | 2599 | nfs4_schedule_state_recovery(clp); |
2600 | case -NFS4ERR_CB_PATH_DOWN: | ||
2601 | nfs4_schedule_state_recovery(clp); | ||
2602 | } | ||
2603 | return; | 2600 | return; |
2604 | } | 2601 | } |
2605 | spin_lock(&clp->cl_lock); | 2602 | spin_lock(&clp->cl_lock); |
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index d9ef602fbc5a..e3ed5908820b 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -129,7 +129,7 @@ enum { | |||
129 | Opt_err | 129 | Opt_err |
130 | }; | 130 | }; |
131 | 131 | ||
132 | static match_table_t __initconst tokens = { | 132 | static const match_table_t tokens __initconst = { |
133 | {Opt_port, "port=%u"}, | 133 | {Opt_port, "port=%u"}, |
134 | {Opt_rsize, "rsize=%u"}, | 134 | {Opt_rsize, "rsize=%u"}, |
135 | {Opt_wsize, "wsize=%u"}, | 135 | {Opt_wsize, "wsize=%u"}, |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 50ff3f2cdf24..d6759b92006f 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
@@ -576,7 +576,7 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, | |||
576 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); | 576 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); |
577 | 577 | ||
578 | out_free: | 578 | out_free: |
579 | while (--n > 0) | 579 | while (--n >= 0) |
580 | vfree(kbufs[n]); | 580 | vfree(kbufs[n]); |
581 | kfree(kbufs[4]); | 581 | kfree(kbufs[4]); |
582 | return ret; | 582 | return ret; |