diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/Kconfig | 4 | ||||
-rw-r--r-- | fs/aio.c | 6 | ||||
-rw-r--r-- | fs/bio.c | 23 | ||||
-rw-r--r-- | fs/cifs/inode.c | 6 | ||||
-rw-r--r-- | fs/cifs/link.c | 33 | ||||
-rw-r--r-- | fs/jfs/jfs_filsys.h | 2 | ||||
-rw-r--r-- | fs/reiserfs/journal.c | 6 |
7 files changed, 41 insertions, 39 deletions
diff --git a/fs/Kconfig b/fs/Kconfig index 7b1511d50b05..b3b5aa0edff9 100644 --- a/fs/Kconfig +++ b/fs/Kconfig | |||
@@ -972,7 +972,7 @@ config SYSFS | |||
972 | 972 | ||
973 | Some system agents rely on the information in sysfs to operate. | 973 | Some system agents rely on the information in sysfs to operate. |
974 | /sbin/hotplug uses device and object attributes in sysfs to assist in | 974 | /sbin/hotplug uses device and object attributes in sysfs to assist in |
975 | delegating policy decisions, like persistantly naming devices. | 975 | delegating policy decisions, like persistently naming devices. |
976 | 976 | ||
977 | sysfs is currently used by the block subsystem to mount the root | 977 | sysfs is currently used by the block subsystem to mount the root |
978 | partition. If sysfs is disabled you must specify the boot device on | 978 | partition. If sysfs is disabled you must specify the boot device on |
@@ -1145,7 +1145,7 @@ config BEFS_FS | |||
1145 | help | 1145 | help |
1146 | The BeOS File System (BeFS) is the native file system of Be, Inc's | 1146 | The BeOS File System (BeFS) is the native file system of Be, Inc's |
1147 | BeOS. Notable features include support for arbitrary attributes | 1147 | BeOS. Notable features include support for arbitrary attributes |
1148 | on files and directories, and database-like indeces on selected | 1148 | on files and directories, and database-like indices on selected |
1149 | attributes. (Also note that this driver doesn't make those features | 1149 | attributes. (Also note that this driver doesn't make those features |
1150 | available at this time). It is a 64 bit filesystem, so it supports | 1150 | available at this time). It is a 64 bit filesystem, so it supports |
1151 | extremely large volumes and files. | 1151 | extremely large volumes and files. |
@@ -367,8 +367,7 @@ void fastcall __put_ioctx(struct kioctx *ctx) | |||
367 | { | 367 | { |
368 | unsigned nr_events = ctx->max_reqs; | 368 | unsigned nr_events = ctx->max_reqs; |
369 | 369 | ||
370 | if (unlikely(ctx->reqs_active)) | 370 | BUG_ON(ctx->reqs_active); |
371 | BUG(); | ||
372 | 371 | ||
373 | cancel_delayed_work(&ctx->wq); | 372 | cancel_delayed_work(&ctx->wq); |
374 | flush_workqueue(aio_wq); | 373 | flush_workqueue(aio_wq); |
@@ -505,8 +504,7 @@ static int __aio_put_req(struct kioctx *ctx, struct kiocb *req) | |||
505 | assert_spin_locked(&ctx->ctx_lock); | 504 | assert_spin_locked(&ctx->ctx_lock); |
506 | 505 | ||
507 | req->ki_users --; | 506 | req->ki_users --; |
508 | if (unlikely(req->ki_users < 0)) | 507 | BUG_ON(req->ki_users < 0); |
509 | BUG(); | ||
510 | if (likely(req->ki_users)) | 508 | if (likely(req->ki_users)) |
511 | return 0; | 509 | return 0; |
512 | list_del(&req->ki_list); /* remove from active_reqs */ | 510 | list_del(&req->ki_list); /* remove from active_reqs */ |
@@ -560,10 +560,8 @@ struct bio *bio_copy_user(request_queue_t *q, unsigned long uaddr, | |||
560 | break; | 560 | break; |
561 | } | 561 | } |
562 | 562 | ||
563 | if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) { | 563 | if (bio_add_pc_page(q, bio, page, bytes, 0) < bytes) |
564 | ret = -EINVAL; | ||
565 | break; | 564 | break; |
566 | } | ||
567 | 565 | ||
568 | len -= bytes; | 566 | len -= bytes; |
569 | } | 567 | } |
@@ -622,10 +620,9 @@ static struct bio *__bio_map_user_iov(request_queue_t *q, | |||
622 | 620 | ||
623 | nr_pages += end - start; | 621 | nr_pages += end - start; |
624 | /* | 622 | /* |
625 | * transfer and buffer must be aligned to at least hardsector | 623 | * buffer must be aligned to at least hardsector size for now |
626 | * size for now, in the future we can relax this restriction | ||
627 | */ | 624 | */ |
628 | if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment(q))) | 625 | if (uaddr & queue_dma_alignment(q)) |
629 | return ERR_PTR(-EINVAL); | 626 | return ERR_PTR(-EINVAL); |
630 | } | 627 | } |
631 | 628 | ||
@@ -751,7 +748,6 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
751 | int write_to_vm) | 748 | int write_to_vm) |
752 | { | 749 | { |
753 | struct bio *bio; | 750 | struct bio *bio; |
754 | int len = 0, i; | ||
755 | 751 | ||
756 | bio = __bio_map_user_iov(q, bdev, iov, iov_count, write_to_vm); | 752 | bio = __bio_map_user_iov(q, bdev, iov, iov_count, write_to_vm); |
757 | 753 | ||
@@ -766,18 +762,7 @@ struct bio *bio_map_user_iov(request_queue_t *q, struct block_device *bdev, | |||
766 | */ | 762 | */ |
767 | bio_get(bio); | 763 | bio_get(bio); |
768 | 764 | ||
769 | for (i = 0; i < iov_count; i++) | 765 | return bio; |
770 | len += iov[i].iov_len; | ||
771 | |||
772 | if (bio->bi_size == len) | ||
773 | return bio; | ||
774 | |||
775 | /* | ||
776 | * don't support partial mappings | ||
777 | */ | ||
778 | bio_endio(bio, bio->bi_size, 0); | ||
779 | bio_unmap_user(bio); | ||
780 | return ERR_PTR(-EINVAL); | ||
781 | } | 766 | } |
782 | 767 | ||
783 | static void __bio_unmap_user(struct bio *bio) | 768 | static void __bio_unmap_user(struct bio *bio) |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index 1ad8c9fcc742..c4fa91b8b62f 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -318,6 +318,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
318 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 318 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
319 | char *tmp_path; | 319 | char *tmp_path; |
320 | char *buf = NULL; | 320 | char *buf = NULL; |
321 | int adjustTZ = FALSE; | ||
321 | 322 | ||
322 | pTcon = cifs_sb->tcon; | 323 | pTcon = cifs_sb->tcon; |
323 | cFYI(1,("Getting info on %s", search_path)); | 324 | cFYI(1,("Getting info on %s", search_path)); |
@@ -348,6 +349,7 @@ int cifs_get_inode_info(struct inode **pinode, | |||
348 | pfindData, cifs_sb->local_nls, | 349 | pfindData, cifs_sb->local_nls, |
349 | cifs_sb->mnt_cifs_flags & | 350 | cifs_sb->mnt_cifs_flags & |
350 | CIFS_MOUNT_MAP_SPECIAL_CHR); | 351 | CIFS_MOUNT_MAP_SPECIAL_CHR); |
352 | adjustTZ = TRUE; | ||
351 | } | 353 | } |
352 | 354 | ||
353 | } | 355 | } |
@@ -444,6 +446,10 @@ int cifs_get_inode_info(struct inode **pinode, | |||
444 | inode->i_ctime = | 446 | inode->i_ctime = |
445 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); | 447 | cifs_NTtimeToUnix(le64_to_cpu(pfindData->ChangeTime)); |
446 | cFYI(0, ("Attributes came in as 0x%x", attr)); | 448 | cFYI(0, ("Attributes came in as 0x%x", attr)); |
449 | if(adjustTZ && (pTcon->ses) && (pTcon->ses->server)) { | ||
450 | inode->i_ctime.tv_sec += pTcon->ses->server->timeAdj; | ||
451 | inode->i_mtime.tv_sec += pTcon->ses->server->timeAdj; | ||
452 | } | ||
447 | 453 | ||
448 | /* set default mode. will override for dirs below */ | 454 | /* set default mode. will override for dirs below */ |
449 | if (atomic_read(&cifsInfo->inUse) == 0) | 455 | if (atomic_read(&cifsInfo->inUse) == 0) |
diff --git a/fs/cifs/link.c b/fs/cifs/link.c index 0bee8b7e521a..8e259969354b 100644 --- a/fs/cifs/link.c +++ b/fs/cifs/link.c | |||
@@ -69,17 +69,30 @@ cifs_hardlink(struct dentry *old_file, struct inode *inode, | |||
69 | rc = -EOPNOTSUPP; | 69 | rc = -EOPNOTSUPP; |
70 | } | 70 | } |
71 | 71 | ||
72 | /* if (!rc) */ | 72 | d_drop(direntry); /* force new lookup from server of target */ |
73 | { | 73 | |
74 | /* renew_parental_timestamps(old_file); | 74 | /* if source file is cached (oplocked) revalidate will not go to server |
75 | inode->i_nlink++; | 75 | until the file is closed or oplock broken so update nlinks locally */ |
76 | mark_inode_dirty(inode); | 76 | if(old_file->d_inode) { |
77 | d_instantiate(direntry, inode); */ | 77 | cifsInode = CIFS_I(old_file->d_inode); |
78 | /* BB add call to either mark inode dirty or refresh its data and timestamp to current time */ | 78 | if(rc == 0) { |
79 | old_file->d_inode->i_nlink++; | ||
80 | old_file->d_inode->i_ctime = CURRENT_TIME; | ||
81 | /* parent dir timestamps will update from srv | ||
82 | within a second, would it really be worth it | ||
83 | to set the parent dir cifs inode time to zero | ||
84 | to force revalidate (faster) for it too? */ | ||
85 | } | ||
86 | /* if not oplocked will force revalidate to get info | ||
87 | on source file from srv */ | ||
88 | cifsInode->time = 0; | ||
89 | |||
90 | /* Will update parent dir timestamps from srv within a second. | ||
91 | Would it really be worth it to set the parent dir (cifs | ||
92 | inode) time field to zero to force revalidate on parent | ||
93 | directory faster ie | ||
94 | CIFS_I(inode)->time = 0; */ | ||
79 | } | 95 | } |
80 | d_drop(direntry); /* force new lookup from server */ | ||
81 | cifsInode = CIFS_I(old_file->d_inode); | ||
82 | cifsInode->time = 0; /* will force revalidate to go get info when needed */ | ||
83 | 96 | ||
84 | cifs_hl_exit: | 97 | cifs_hl_exit: |
85 | kfree(fromName); | 98 | kfree(fromName); |
diff --git a/fs/jfs/jfs_filsys.h b/fs/jfs/jfs_filsys.h index 9901928668cf..eb550b339bb8 100644 --- a/fs/jfs/jfs_filsys.h +++ b/fs/jfs/jfs_filsys.h | |||
@@ -81,7 +81,7 @@ | |||
81 | #define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */ | 81 | #define JFS_SWAP_BYTES 0x00100000 /* running on big endian computer */ |
82 | 82 | ||
83 | /* Directory index */ | 83 | /* Directory index */ |
84 | #define JFS_DIR_INDEX 0x00200000 /* Persistant index for */ | 84 | #define JFS_DIR_INDEX 0x00200000 /* Persistent index for */ |
85 | /* directory entries */ | 85 | /* directory entries */ |
86 | 86 | ||
87 | 87 | ||
diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 85ce23268302..ac93174c9639 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c | |||
@@ -1464,7 +1464,7 @@ static int flush_journal_list(struct super_block *s, | |||
1464 | } | 1464 | } |
1465 | 1465 | ||
1466 | /* if someone has this block in a newer transaction, just make | 1466 | /* if someone has this block in a newer transaction, just make |
1467 | ** sure they are commited, and don't try writing it to disk | 1467 | ** sure they are committed, and don't try writing it to disk |
1468 | */ | 1468 | */ |
1469 | if (pjl) { | 1469 | if (pjl) { |
1470 | if (atomic_read(&pjl->j_commit_left)) | 1470 | if (atomic_read(&pjl->j_commit_left)) |
@@ -3384,7 +3384,7 @@ static int remove_from_transaction(struct super_block *p_s_sb, | |||
3384 | 3384 | ||
3385 | /* | 3385 | /* |
3386 | ** for any cnode in a journal list, it can only be dirtied of all the | 3386 | ** for any cnode in a journal list, it can only be dirtied of all the |
3387 | ** transactions that include it are commited to disk. | 3387 | ** transactions that include it are committed to disk. |
3388 | ** this checks through each transaction, and returns 1 if you are allowed to dirty, | 3388 | ** this checks through each transaction, and returns 1 if you are allowed to dirty, |
3389 | ** and 0 if you aren't | 3389 | ** and 0 if you aren't |
3390 | ** | 3390 | ** |
@@ -3426,7 +3426,7 @@ static int can_dirty(struct reiserfs_journal_cnode *cn) | |||
3426 | } | 3426 | } |
3427 | 3427 | ||
3428 | /* syncs the commit blocks, but does not force the real buffers to disk | 3428 | /* syncs the commit blocks, but does not force the real buffers to disk |
3429 | ** will wait until the current transaction is done/commited before returning | 3429 | ** will wait until the current transaction is done/committed before returning |
3430 | */ | 3430 | */ |
3431 | int journal_end_sync(struct reiserfs_transaction_handle *th, | 3431 | int journal_end_sync(struct reiserfs_transaction_handle *th, |
3432 | struct super_block *p_s_sb, unsigned long nblocks) | 3432 | struct super_block *p_s_sb, unsigned long nblocks) |