diff options
Diffstat (limited to 'fs')
| -rw-r--r-- | fs/cifs/cifsproto.h | 1 | ||||
| -rw-r--r-- | fs/cifs/connect.c | 8 | ||||
| -rw-r--r-- | fs/cifs/inode.c | 7 | ||||
| -rw-r--r-- | fs/cifs/misc.c | 14 | ||||
| -rw-r--r-- | fs/cifs/readdir.c | 7 | ||||
| -rw-r--r-- | fs/nilfs2/ioctl.c | 33 |
6 files changed, 36 insertions, 34 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 6928c24d1d42..5646727e33f5 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
| @@ -388,4 +388,5 @@ extern int CIFSSMBSetPosixACL(const int xid, struct cifsTconInfo *tcon, | |||
| 388 | const struct nls_table *nls_codepage, int remap_special_chars); | 388 | const struct nls_table *nls_codepage, int remap_special_chars); |
| 389 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, | 389 | extern int CIFSGetExtAttr(const int xid, struct cifsTconInfo *tcon, |
| 390 | const int netfid, __u64 *pExtAttrBits, __u64 *pMask); | 390 | const int netfid, __u64 *pExtAttrBits, __u64 *pMask); |
| 391 | extern void cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb); | ||
| 391 | #endif /* _CIFSPROTO_H */ | 392 | #endif /* _CIFSPROTO_H */ |
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c index b09098079916..63ea83ff687f 100644 --- a/fs/cifs/connect.c +++ b/fs/cifs/connect.c | |||
| @@ -2220,16 +2220,8 @@ is_path_accessible(int xid, struct cifsTconInfo *tcon, | |||
| 2220 | struct cifs_sb_info *cifs_sb, const char *full_path) | 2220 | struct cifs_sb_info *cifs_sb, const char *full_path) |
| 2221 | { | 2221 | { |
| 2222 | int rc; | 2222 | int rc; |
| 2223 | __u64 inode_num; | ||
| 2224 | FILE_ALL_INFO *pfile_info; | 2223 | FILE_ALL_INFO *pfile_info; |
| 2225 | 2224 | ||
| 2226 | rc = CIFSGetSrvInodeNumber(xid, tcon, full_path, &inode_num, | ||
| 2227 | cifs_sb->local_nls, | ||
| 2228 | cifs_sb->mnt_cifs_flags & | ||
| 2229 | CIFS_MOUNT_MAP_SPECIAL_CHR); | ||
| 2230 | if (rc != -EOPNOTSUPP) | ||
| 2231 | return rc; | ||
| 2232 | |||
| 2233 | pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); | 2225 | pfile_info = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL); |
| 2234 | if (pfile_info == NULL) | 2226 | if (pfile_info == NULL) |
| 2235 | return -ENOMEM; | 2227 | return -ENOMEM; |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 5e2492535daa..cababd8a52df 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
| @@ -512,13 +512,10 @@ int cifs_get_inode_info(struct inode **pinode, | |||
| 512 | cifs_sb->local_nls, | 512 | cifs_sb->local_nls, |
| 513 | cifs_sb->mnt_cifs_flags & | 513 | cifs_sb->mnt_cifs_flags & |
| 514 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 514 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
| 515 | if (rc1) { | 515 | if (rc1 || !fattr.cf_uniqueid) { |
| 516 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); | 516 | cFYI(1, ("GetSrvInodeNum rc %d", rc1)); |
| 517 | fattr.cf_uniqueid = iunique(sb, ROOT_I); | 517 | fattr.cf_uniqueid = iunique(sb, ROOT_I); |
| 518 | /* disable serverino if call not supported */ | 518 | cifs_autodisable_serverino(cifs_sb); |
| 519 | if (rc1 == -EINVAL) | ||
| 520 | cifs_sb->mnt_cifs_flags &= | ||
| 521 | ~CIFS_MOUNT_SERVER_INUM; | ||
| 522 | } | 519 | } |
| 523 | } else { | 520 | } else { |
| 524 | fattr.cf_uniqueid = iunique(sb, ROOT_I); | 521 | fattr.cf_uniqueid = iunique(sb, ROOT_I); |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 0241b25ac33f..1e25efcb55c8 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
| @@ -715,3 +715,17 @@ cifsConvertToUCS(__le16 *target, const char *source, int maxlen, | |||
| 715 | ctoUCS_out: | 715 | ctoUCS_out: |
| 716 | return i; | 716 | return i; |
| 717 | } | 717 | } |
| 718 | |||
| 719 | void | ||
| 720 | cifs_autodisable_serverino(struct cifs_sb_info *cifs_sb) | ||
| 721 | { | ||
| 722 | if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM) { | ||
| 723 | cifs_sb->mnt_cifs_flags &= CIFS_MOUNT_SERVER_INUM; | ||
| 724 | cERROR(1, ("Autodisabling the use of server inode numbers on " | ||
| 725 | "%s. This server doesn't seem to support them " | ||
| 726 | "properly. Hardlinks will not be recognized on this " | ||
| 727 | "mount. Consider mounting with the \"noserverino\" " | ||
| 728 | "option to silence this message.", | ||
| 729 | cifs_sb->tcon->treeName)); | ||
| 730 | } | ||
| 731 | } | ||
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 1f098ca71636..f84062f9a985 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
| @@ -727,11 +727,12 @@ static int cifs_filldir(char *pfindEntry, struct file *file, filldir_t filldir, | |||
| 727 | cifs_dir_info_to_fattr(&fattr, (FILE_DIRECTORY_INFO *) | 727 | cifs_dir_info_to_fattr(&fattr, (FILE_DIRECTORY_INFO *) |
| 728 | pfindEntry, cifs_sb); | 728 | pfindEntry, cifs_sb); |
| 729 | 729 | ||
| 730 | /* FIXME: make _to_fattr functions fill this out */ | 730 | if (inum && (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SERVER_INUM)) { |
| 731 | if (pCifsF->srch_inf.info_level == SMB_FIND_FILE_ID_FULL_DIR_INFO) | ||
| 732 | fattr.cf_uniqueid = inum; | 731 | fattr.cf_uniqueid = inum; |
| 733 | else | 732 | } else { |
| 734 | fattr.cf_uniqueid = iunique(sb, ROOT_I); | 733 | fattr.cf_uniqueid = iunique(sb, ROOT_I); |
| 734 | cifs_autodisable_serverino(cifs_sb); | ||
| 735 | } | ||
| 735 | 736 | ||
| 736 | ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid); | 737 | ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid); |
| 737 | tmp_dentry = cifs_readdir_lookup(file->f_dentry, &qstring, &fattr); | 738 | tmp_dentry = cifs_readdir_lookup(file->f_dentry, &qstring, &fattr); |
diff --git a/fs/nilfs2/ioctl.c b/fs/nilfs2/ioctl.c index 6572ea4bc4df..d24057d58f17 100644 --- a/fs/nilfs2/ioctl.c +++ b/fs/nilfs2/ioctl.c | |||
| @@ -297,7 +297,18 @@ static int nilfs_ioctl_move_inode_block(struct inode *inode, | |||
| 297 | (unsigned long long)vdesc->vd_vblocknr); | 297 | (unsigned long long)vdesc->vd_vblocknr); |
| 298 | return ret; | 298 | return ret; |
| 299 | } | 299 | } |
| 300 | bh->b_private = vdesc; | 300 | if (unlikely(!list_empty(&bh->b_assoc_buffers))) { |
| 301 | printk(KERN_CRIT "%s: conflicting %s buffer: ino=%llu, " | ||
| 302 | "cno=%llu, offset=%llu, blocknr=%llu, vblocknr=%llu\n", | ||
| 303 | __func__, vdesc->vd_flags ? "node" : "data", | ||
| 304 | (unsigned long long)vdesc->vd_ino, | ||
| 305 | (unsigned long long)vdesc->vd_cno, | ||
| 306 | (unsigned long long)vdesc->vd_offset, | ||
| 307 | (unsigned long long)vdesc->vd_blocknr, | ||
| 308 | (unsigned long long)vdesc->vd_vblocknr); | ||
| 309 | brelse(bh); | ||
| 310 | return -EEXIST; | ||
| 311 | } | ||
| 301 | list_add_tail(&bh->b_assoc_buffers, buffers); | 312 | list_add_tail(&bh->b_assoc_buffers, buffers); |
| 302 | return 0; | 313 | return 0; |
| 303 | } | 314 | } |
| @@ -335,24 +346,10 @@ static int nilfs_ioctl_move_blocks(struct the_nilfs *nilfs, | |||
| 335 | list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) { | 346 | list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) { |
| 336 | ret = nilfs_gccache_wait_and_mark_dirty(bh); | 347 | ret = nilfs_gccache_wait_and_mark_dirty(bh); |
| 337 | if (unlikely(ret < 0)) { | 348 | if (unlikely(ret < 0)) { |
| 338 | if (ret == -EEXIST) { | 349 | WARN_ON(ret == -EEXIST); |
| 339 | vdesc = bh->b_private; | ||
| 340 | printk(KERN_CRIT | ||
| 341 | "%s: conflicting %s buffer: " | ||
| 342 | "ino=%llu, cno=%llu, offset=%llu, " | ||
| 343 | "blocknr=%llu, vblocknr=%llu\n", | ||
| 344 | __func__, | ||
| 345 | vdesc->vd_flags ? "node" : "data", | ||
| 346 | (unsigned long long)vdesc->vd_ino, | ||
| 347 | (unsigned long long)vdesc->vd_cno, | ||
| 348 | (unsigned long long)vdesc->vd_offset, | ||
| 349 | (unsigned long long)vdesc->vd_blocknr, | ||
| 350 | (unsigned long long)vdesc->vd_vblocknr); | ||
| 351 | } | ||
| 352 | goto failed; | 350 | goto failed; |
| 353 | } | 351 | } |
| 354 | list_del_init(&bh->b_assoc_buffers); | 352 | list_del_init(&bh->b_assoc_buffers); |
| 355 | bh->b_private = NULL; | ||
| 356 | brelse(bh); | 353 | brelse(bh); |
| 357 | } | 354 | } |
| 358 | return nmembs; | 355 | return nmembs; |
| @@ -360,7 +357,6 @@ static int nilfs_ioctl_move_blocks(struct the_nilfs *nilfs, | |||
| 360 | failed: | 357 | failed: |
| 361 | list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) { | 358 | list_for_each_entry_safe(bh, n, &buffers, b_assoc_buffers) { |
| 362 | list_del_init(&bh->b_assoc_buffers); | 359 | list_del_init(&bh->b_assoc_buffers); |
| 363 | bh->b_private = NULL; | ||
| 364 | brelse(bh); | 360 | brelse(bh); |
| 365 | } | 361 | } |
| 366 | return ret; | 362 | return ret; |
| @@ -471,7 +467,6 @@ int nilfs_ioctl_prepare_clean_segments(struct the_nilfs *nilfs, | |||
| 471 | return 0; | 467 | return 0; |
| 472 | 468 | ||
| 473 | failed: | 469 | failed: |
| 474 | nilfs_remove_all_gcinode(nilfs); | ||
| 475 | printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n", | 470 | printk(KERN_ERR "NILFS: GC failed during preparation: %s: err=%d\n", |
| 476 | msg, ret); | 471 | msg, ret); |
| 477 | return ret; | 472 | return ret; |
| @@ -560,6 +555,8 @@ static int nilfs_ioctl_clean_segments(struct inode *inode, struct file *filp, | |||
| 560 | else | 555 | else |
| 561 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); | 556 | ret = nilfs_clean_segments(inode->i_sb, argv, kbufs); |
| 562 | 557 | ||
| 558 | if (ret < 0) | ||
| 559 | nilfs_remove_all_gcinode(nilfs); | ||
| 563 | clear_nilfs_gc_running(nilfs); | 560 | clear_nilfs_gc_running(nilfs); |
| 564 | 561 | ||
| 565 | out_free: | 562 | out_free: |
