diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-17 09:37:55 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-08-17 09:37:55 -0400 |
commit | 327b6b08d6ab3bf5488120ba02ed2fe06b09efe6 (patch) | |
tree | 592b0ebc2f5f18dac0bdc0fd6ba87d2c8b07b232 /fs | |
parent | c973b112c76c9d8fd042991128f218a738cc8d0a (diff) | |
parent | 2ad56496627630ebc99f06af5f81ca23e17e014e (diff) |
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/CHANGES | 6 | ||||
-rw-r--r-- | fs/cifs/cifssmb.c | 3 | ||||
-rw-r--r-- | fs/cifs/misc.c | 1 | ||||
-rw-r--r-- | fs/inotify.c | 2 | ||||
-rw-r--r-- | fs/jfs/inode.c | 4 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.c | 36 | ||||
-rw-r--r-- | fs/jfs/jfs_logmgr.h | 2 | ||||
-rw-r--r-- | fs/jfs/jfs_txnmgr.c | 12 | ||||
-rw-r--r-- | fs/jfs/super.c | 4 | ||||
-rw-r--r-- | fs/namei.c | 3 | ||||
-rw-r--r-- | fs/nfs/inode.c | 37 | ||||
-rw-r--r-- | fs/nfs/nfs3proc.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 10 | ||||
-rw-r--r-- | fs/nfs/proc.c | 2 | ||||
-rw-r--r-- | fs/nfs_common/nfsacl.c | 1 | ||||
-rw-r--r-- | fs/ntfs/ChangeLog | 3 | ||||
-rw-r--r-- | fs/ntfs/mft.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/namei.c | 3 |
18 files changed, 94 insertions, 41 deletions
diff --git a/fs/cifs/CHANGES b/fs/cifs/CHANGES index dab4774ee7bb..3196d4c4eed3 100644 --- a/fs/cifs/CHANGES +++ b/fs/cifs/CHANGES | |||
@@ -1,3 +1,9 @@ | |||
1 | Version 1.35 | ||
2 | ------------ | ||
3 | Add writepage performance improvements. Fix path name conversions | ||
4 | for long filenames on mounts which were done with "mapchars" mount option | ||
5 | specified. | ||
6 | |||
1 | Version 1.34 | 7 | Version 1.34 |
2 | ------------ | 8 | ------------ |
3 | Fix error mapping of the TOO_MANY_LINKS (hardlinks) case. | 9 | Fix error mapping of the TOO_MANY_LINKS (hardlinks) case. |
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 3c628bf667a5..0db0b313d715 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c | |||
@@ -2602,6 +2602,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, | |||
2602 | if(name_len < PATH_MAX) { | 2602 | if(name_len < PATH_MAX) { |
2603 | memcpy(pSMB->ResumeFileName, psrch_inf->presume_name, name_len); | 2603 | memcpy(pSMB->ResumeFileName, psrch_inf->presume_name, name_len); |
2604 | byte_count += name_len; | 2604 | byte_count += name_len; |
2605 | /* 14 byte parm len above enough for 2 byte null terminator */ | ||
2606 | pSMB->ResumeFileName[name_len] = 0; | ||
2607 | pSMB->ResumeFileName[name_len+1] = 0; | ||
2605 | } else { | 2608 | } else { |
2606 | rc = -EINVAL; | 2609 | rc = -EINVAL; |
2607 | goto FNext2_err_exit; | 2610 | goto FNext2_err_exit; |
diff --git a/fs/cifs/misc.c b/fs/cifs/misc.c index 072b4ee8c53e..20ae4153f791 100644 --- a/fs/cifs/misc.c +++ b/fs/cifs/misc.c | |||
@@ -611,6 +611,7 @@ cifsConvertToUCS(__le16 * target, const char *source, int maxlen, | |||
611 | src_char = source[i]; | 611 | src_char = source[i]; |
612 | switch (src_char) { | 612 | switch (src_char) { |
613 | case 0: | 613 | case 0: |
614 | target[j] = 0; | ||
614 | goto ctoUCS_out; | 615 | goto ctoUCS_out; |
615 | case ':': | 616 | case ':': |
616 | target[j] = cpu_to_le16(UNI_COLON); | 617 | target[j] = cpu_to_le16(UNI_COLON); |
diff --git a/fs/inotify.c b/fs/inotify.c index 27ebcac5e07f..868901b1e779 100644 --- a/fs/inotify.c +++ b/fs/inotify.c | |||
@@ -402,7 +402,7 @@ static struct inotify_watch *create_watch(struct inotify_device *dev, | |||
402 | return ERR_PTR(ret); | 402 | return ERR_PTR(ret); |
403 | } | 403 | } |
404 | 404 | ||
405 | dev->last_wd = ret; | 405 | dev->last_wd = watch->wd; |
406 | watch->mask = mask; | 406 | watch->mask = mask; |
407 | atomic_set(&watch->count, 0); | 407 | atomic_set(&watch->count, 0); |
408 | INIT_LIST_HEAD(&watch->d_list); | 408 | INIT_LIST_HEAD(&watch->d_list); |
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c index 2137138c59b0..767c7ecb429e 100644 --- a/fs/jfs/inode.c +++ b/fs/jfs/inode.c | |||
@@ -128,6 +128,10 @@ void jfs_delete_inode(struct inode *inode) | |||
128 | { | 128 | { |
129 | jfs_info("In jfs_delete_inode, inode = 0x%p", inode); | 129 | jfs_info("In jfs_delete_inode, inode = 0x%p", inode); |
130 | 130 | ||
131 | if (is_bad_inode(inode) || | ||
132 | (JFS_IP(inode)->fileset != cpu_to_le32(FILESYSTEM_I))) | ||
133 | return; | ||
134 | |||
131 | if (test_cflag(COMMIT_Freewmap, inode)) | 135 | if (test_cflag(COMMIT_Freewmap, inode)) |
132 | jfs_free_zero_link(inode); | 136 | jfs_free_zero_link(inode); |
133 | 137 | ||
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 22815e88e7cc..d27bac6acaa3 100644 --- a/fs/jfs/jfs_logmgr.c +++ b/fs/jfs/jfs_logmgr.c | |||
@@ -191,7 +191,7 @@ static int lbmIOWait(struct lbuf * bp, int flag); | |||
191 | static bio_end_io_t lbmIODone; | 191 | static bio_end_io_t lbmIODone; |
192 | static void lbmStartIO(struct lbuf * bp); | 192 | static void lbmStartIO(struct lbuf * bp); |
193 | static void lmGCwrite(struct jfs_log * log, int cant_block); | 193 | static void lmGCwrite(struct jfs_log * log, int cant_block); |
194 | static int lmLogSync(struct jfs_log * log, int nosyncwait); | 194 | static int lmLogSync(struct jfs_log * log, int hard_sync); |
195 | 195 | ||
196 | 196 | ||
197 | 197 | ||
@@ -915,19 +915,17 @@ static void lmPostGC(struct lbuf * bp) | |||
915 | * if new sync address is available | 915 | * if new sync address is available |
916 | * (normally the case if sync() is executed by back-ground | 916 | * (normally the case if sync() is executed by back-ground |
917 | * process). | 917 | * process). |
918 | * if not, explicitly run jfs_blogsync() to initiate | ||
919 | * getting of new sync address. | ||
920 | * calculate new value of i_nextsync which determines when | 918 | * calculate new value of i_nextsync which determines when |
921 | * this code is called again. | 919 | * this code is called again. |
922 | * | 920 | * |
923 | * PARAMETERS: log - log structure | 921 | * PARAMETERS: log - log structure |
924 | * nosyncwait - 1 if called asynchronously | 922 | * hard_sync - 1 to force all metadata to be written |
925 | * | 923 | * |
926 | * RETURN: 0 | 924 | * RETURN: 0 |
927 | * | 925 | * |
928 | * serialization: LOG_LOCK() held on entry/exit | 926 | * serialization: LOG_LOCK() held on entry/exit |
929 | */ | 927 | */ |
930 | static int lmLogSync(struct jfs_log * log, int nosyncwait) | 928 | static int lmLogSync(struct jfs_log * log, int hard_sync) |
931 | { | 929 | { |
932 | int logsize; | 930 | int logsize; |
933 | int written; /* written since last syncpt */ | 931 | int written; /* written since last syncpt */ |
@@ -941,11 +939,18 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait) | |||
941 | unsigned long flags; | 939 | unsigned long flags; |
942 | 940 | ||
943 | /* push dirty metapages out to disk */ | 941 | /* push dirty metapages out to disk */ |
944 | list_for_each_entry(sbi, &log->sb_list, log_list) { | 942 | if (hard_sync) |
945 | filemap_flush(sbi->ipbmap->i_mapping); | 943 | list_for_each_entry(sbi, &log->sb_list, log_list) { |
946 | filemap_flush(sbi->ipimap->i_mapping); | 944 | filemap_fdatawrite(sbi->ipbmap->i_mapping); |
947 | filemap_flush(sbi->direct_inode->i_mapping); | 945 | filemap_fdatawrite(sbi->ipimap->i_mapping); |
948 | } | 946 | filemap_fdatawrite(sbi->direct_inode->i_mapping); |
947 | } | ||
948 | else | ||
949 | list_for_each_entry(sbi, &log->sb_list, log_list) { | ||
950 | filemap_flush(sbi->ipbmap->i_mapping); | ||
951 | filemap_flush(sbi->ipimap->i_mapping); | ||
952 | filemap_flush(sbi->direct_inode->i_mapping); | ||
953 | } | ||
949 | 954 | ||
950 | /* | 955 | /* |
951 | * forward syncpt | 956 | * forward syncpt |
@@ -1021,10 +1026,6 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait) | |||
1021 | /* next syncpt trigger = written + more */ | 1026 | /* next syncpt trigger = written + more */ |
1022 | log->nextsync = written + more; | 1027 | log->nextsync = written + more; |
1023 | 1028 | ||
1024 | /* return if lmLogSync() from outside of transaction, e.g., sync() */ | ||
1025 | if (nosyncwait) | ||
1026 | return lsn; | ||
1027 | |||
1028 | /* if number of bytes written from last sync point is more | 1029 | /* if number of bytes written from last sync point is more |
1029 | * than 1/4 of the log size, stop new transactions from | 1030 | * than 1/4 of the log size, stop new transactions from |
1030 | * starting until all current transactions are completed | 1031 | * starting until all current transactions are completed |
@@ -1049,11 +1050,12 @@ static int lmLogSync(struct jfs_log * log, int nosyncwait) | |||
1049 | * | 1050 | * |
1050 | * FUNCTION: write log SYNCPT record for specified log | 1051 | * FUNCTION: write log SYNCPT record for specified log |
1051 | * | 1052 | * |
1052 | * PARAMETERS: log - log structure | 1053 | * PARAMETERS: log - log structure |
1054 | * hard_sync - set to 1 to force metadata to be written | ||
1053 | */ | 1055 | */ |
1054 | void jfs_syncpt(struct jfs_log *log) | 1056 | void jfs_syncpt(struct jfs_log *log, int hard_sync) |
1055 | { LOG_LOCK(log); | 1057 | { LOG_LOCK(log); |
1056 | lmLogSync(log, 1); | 1058 | lmLogSync(log, hard_sync); |
1057 | LOG_UNLOCK(log); | 1059 | LOG_UNLOCK(log); |
1058 | } | 1060 | } |
1059 | 1061 | ||
diff --git a/fs/jfs/jfs_logmgr.h b/fs/jfs/jfs_logmgr.h index 747114cd38b8..e4978b5b65ee 100644 --- a/fs/jfs/jfs_logmgr.h +++ b/fs/jfs/jfs_logmgr.h | |||
@@ -510,6 +510,6 @@ extern int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize); | |||
510 | extern int lmGroupCommit(struct jfs_log *, struct tblock *); | 510 | extern int lmGroupCommit(struct jfs_log *, struct tblock *); |
511 | extern int jfsIOWait(void *); | 511 | extern int jfsIOWait(void *); |
512 | extern void jfs_flush_journal(struct jfs_log * log, int wait); | 512 | extern void jfs_flush_journal(struct jfs_log * log, int wait); |
513 | extern void jfs_syncpt(struct jfs_log *log); | 513 | extern void jfs_syncpt(struct jfs_log *log, int hard_sync); |
514 | 514 | ||
515 | #endif /* _H_JFS_LOGMGR */ | 515 | #endif /* _H_JFS_LOGMGR */ |
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c index 121c981ff453..c7a92f9deb2b 100644 --- a/fs/jfs/jfs_txnmgr.c +++ b/fs/jfs/jfs_txnmgr.c | |||
@@ -552,6 +552,11 @@ void txEnd(tid_t tid) | |||
552 | * synchronize with logsync barrier | 552 | * synchronize with logsync barrier |
553 | */ | 553 | */ |
554 | if (test_bit(log_SYNCBARRIER, &log->flag)) { | 554 | if (test_bit(log_SYNCBARRIER, &log->flag)) { |
555 | TXN_UNLOCK(); | ||
556 | |||
557 | /* write dirty metadata & forward log syncpt */ | ||
558 | jfs_syncpt(log, 1); | ||
559 | |||
555 | jfs_info("log barrier off: 0x%x", log->lsn); | 560 | jfs_info("log barrier off: 0x%x", log->lsn); |
556 | 561 | ||
557 | /* enable new transactions start */ | 562 | /* enable new transactions start */ |
@@ -560,11 +565,6 @@ void txEnd(tid_t tid) | |||
560 | /* wakeup all waitors for logsync barrier */ | 565 | /* wakeup all waitors for logsync barrier */ |
561 | TXN_WAKEUP(&log->syncwait); | 566 | TXN_WAKEUP(&log->syncwait); |
562 | 567 | ||
563 | TXN_UNLOCK(); | ||
564 | |||
565 | /* forward log syncpt */ | ||
566 | jfs_syncpt(log); | ||
567 | |||
568 | goto wakeup; | 568 | goto wakeup; |
569 | } | 569 | } |
570 | } | 570 | } |
@@ -657,7 +657,9 @@ struct tlock *txLock(tid_t tid, struct inode *ip, struct metapage * mp, | |||
657 | /* only anonymous txn. | 657 | /* only anonymous txn. |
658 | * Remove from anon_list | 658 | * Remove from anon_list |
659 | */ | 659 | */ |
660 | TXN_LOCK(); | ||
660 | list_del_init(&jfs_ip->anon_inode_list); | 661 | list_del_init(&jfs_ip->anon_inode_list); |
662 | TXN_UNLOCK(); | ||
661 | } | 663 | } |
662 | jfs_ip->atlhead = tlck->next; | 664 | jfs_ip->atlhead = tlck->next; |
663 | } else { | 665 | } else { |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index ee32211288ce..9ff89720f93b 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -114,6 +114,8 @@ static void jfs_destroy_inode(struct inode *inode) | |||
114 | { | 114 | { |
115 | struct jfs_inode_info *ji = JFS_IP(inode); | 115 | struct jfs_inode_info *ji = JFS_IP(inode); |
116 | 116 | ||
117 | BUG_ON(!list_empty(&ji->anon_inode_list)); | ||
118 | |||
117 | spin_lock_irq(&ji->ag_lock); | 119 | spin_lock_irq(&ji->ag_lock); |
118 | if (ji->active_ag != -1) { | 120 | if (ji->active_ag != -1) { |
119 | struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; | 121 | struct bmap *bmap = JFS_SBI(inode->i_sb)->bmap; |
@@ -531,7 +533,7 @@ static int jfs_sync_fs(struct super_block *sb, int wait) | |||
531 | /* log == NULL indicates read-only mount */ | 533 | /* log == NULL indicates read-only mount */ |
532 | if (log) { | 534 | if (log) { |
533 | jfs_flush_journal(log, wait); | 535 | jfs_flush_journal(log, wait); |
534 | jfs_syncpt(log); | 536 | jfs_syncpt(log, 0); |
535 | } | 537 | } |
536 | 538 | ||
537 | return 0; | 539 | return 0; |
diff --git a/fs/namei.c b/fs/namei.c index 264e232addda..e2c1413a55c4 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2216,7 +2216,8 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry, | |||
2216 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); | 2216 | error = vfs_rename_other(old_dir,old_dentry,new_dir,new_dentry); |
2217 | if (!error) { | 2217 | if (!error) { |
2218 | const char *new_name = old_dentry->d_name.name; | 2218 | const char *new_name = old_dentry->d_name.name; |
2219 | fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, new_dentry->d_inode); | 2219 | fsnotify_move(old_dir, new_dir, old_name, new_name, is_dir, |
2220 | new_dentry->d_inode, old_dentry->d_inode); | ||
2220 | } | 2221 | } |
2221 | fsnotify_oldname_free(old_name); | 2222 | fsnotify_oldname_free(old_name); |
2222 | 2223 | ||
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 4845911f1c63..bb7ca022bcb2 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -814,28 +814,39 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
814 | nfs_wb_all(inode); | 814 | nfs_wb_all(inode); |
815 | } | 815 | } |
816 | error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr); | 816 | error = NFS_PROTO(inode)->setattr(dentry, &fattr, attr); |
817 | if (error == 0) { | 817 | if (error == 0) |
818 | nfs_refresh_inode(inode, &fattr); | 818 | nfs_refresh_inode(inode, &fattr); |
819 | nfs_end_data_update(inode); | ||
820 | unlock_kernel(); | ||
821 | return error; | ||
822 | } | ||
823 | |||
824 | /** | ||
825 | * nfs_setattr_update_inode - Update inode metadata after a setattr call. | ||
826 | * @inode: pointer to struct inode | ||
827 | * @attr: pointer to struct iattr | ||
828 | * | ||
829 | * Note: we do this in the *proc.c in order to ensure that | ||
830 | * it works for things like exclusive creates too. | ||
831 | */ | ||
832 | void nfs_setattr_update_inode(struct inode *inode, struct iattr *attr) | ||
833 | { | ||
834 | if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) { | ||
819 | if ((attr->ia_valid & ATTR_MODE) != 0) { | 835 | if ((attr->ia_valid & ATTR_MODE) != 0) { |
820 | int mode; | 836 | int mode = attr->ia_mode & S_IALLUGO; |
821 | mode = inode->i_mode & ~S_IALLUGO; | 837 | mode |= inode->i_mode & ~S_IALLUGO; |
822 | mode |= attr->ia_mode & S_IALLUGO; | ||
823 | inode->i_mode = mode; | 838 | inode->i_mode = mode; |
824 | } | 839 | } |
825 | if ((attr->ia_valid & ATTR_UID) != 0) | 840 | if ((attr->ia_valid & ATTR_UID) != 0) |
826 | inode->i_uid = attr->ia_uid; | 841 | inode->i_uid = attr->ia_uid; |
827 | if ((attr->ia_valid & ATTR_GID) != 0) | 842 | if ((attr->ia_valid & ATTR_GID) != 0) |
828 | inode->i_gid = attr->ia_gid; | 843 | inode->i_gid = attr->ia_gid; |
829 | if ((attr->ia_valid & ATTR_SIZE) != 0) { | ||
830 | inode->i_size = attr->ia_size; | ||
831 | vmtruncate(inode, attr->ia_size); | ||
832 | } | ||
833 | } | ||
834 | if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) | ||
835 | NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; | 844 | NFS_FLAGS(inode) |= NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL; |
836 | nfs_end_data_update(inode); | 845 | } |
837 | unlock_kernel(); | 846 | if ((attr->ia_valid & ATTR_SIZE) != 0) { |
838 | return error; | 847 | inode->i_size = attr->ia_size; |
848 | vmtruncate(inode, attr->ia_size); | ||
849 | } | ||
839 | } | 850 | } |
840 | 851 | ||
841 | /* | 852 | /* |
diff --git a/fs/nfs/nfs3proc.c b/fs/nfs/nfs3proc.c index 7851569b31c6..2681485cf2d0 100644 --- a/fs/nfs/nfs3proc.c +++ b/fs/nfs/nfs3proc.c | |||
@@ -120,6 +120,8 @@ nfs3_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
120 | dprintk("NFS call setattr\n"); | 120 | dprintk("NFS call setattr\n"); |
121 | fattr->valid = 0; | 121 | fattr->valid = 0; |
122 | status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, 0); | 122 | status = rpc_call(NFS_CLIENT(inode), NFS3PROC_SETATTR, &arg, fattr, 0); |
123 | if (status == 0) | ||
124 | nfs_setattr_update_inode(inode, sattr); | ||
123 | dprintk("NFS reply setattr: %d\n", status); | 125 | dprintk("NFS reply setattr: %d\n", status); |
124 | return status; | 126 | return status; |
125 | } | 127 | } |
@@ -370,6 +372,8 @@ again: | |||
370 | * not sure this buys us anything (and I'd have | 372 | * not sure this buys us anything (and I'd have |
371 | * to revamp the NFSv3 XDR code) */ | 373 | * to revamp the NFSv3 XDR code) */ |
372 | status = nfs3_proc_setattr(dentry, &fattr, sattr); | 374 | status = nfs3_proc_setattr(dentry, &fattr, sattr); |
375 | if (status == 0) | ||
376 | nfs_setattr_update_inode(dentry->d_inode, sattr); | ||
373 | nfs_refresh_inode(dentry->d_inode, &fattr); | 377 | nfs_refresh_inode(dentry->d_inode, &fattr); |
374 | dprintk("NFS reply setattr (post-create): %d\n", status); | 378 | dprintk("NFS reply setattr (post-create): %d\n", status); |
375 | } | 379 | } |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1b76f80aedb9..0c5a308e4963 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -753,6 +753,7 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, | |||
753 | .rpc_argp = &arg, | 753 | .rpc_argp = &arg, |
754 | .rpc_resp = &res, | 754 | .rpc_resp = &res, |
755 | }; | 755 | }; |
756 | int status; | ||
756 | 757 | ||
757 | fattr->valid = 0; | 758 | fattr->valid = 0; |
758 | 759 | ||
@@ -762,7 +763,8 @@ static int _nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, | |||
762 | } else | 763 | } else |
763 | memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid)); | 764 | memcpy(&arg.stateid, &zero_stateid, sizeof(arg.stateid)); |
764 | 765 | ||
765 | return rpc_call_sync(server->client, &msg, 0); | 766 | status = rpc_call_sync(server->client, &msg, 0); |
767 | return status; | ||
766 | } | 768 | } |
767 | 769 | ||
768 | static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, | 770 | static int nfs4_do_setattr(struct nfs_server *server, struct nfs_fattr *fattr, |
@@ -1145,6 +1147,8 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
1145 | 1147 | ||
1146 | status = nfs4_do_setattr(NFS_SERVER(inode), fattr, | 1148 | status = nfs4_do_setattr(NFS_SERVER(inode), fattr, |
1147 | NFS_FH(inode), sattr, state); | 1149 | NFS_FH(inode), sattr, state); |
1150 | if (status == 0) | ||
1151 | nfs_setattr_update_inode(inode, sattr); | ||
1148 | if (state != NULL) | 1152 | if (state != NULL) |
1149 | nfs4_close_state(state, FMODE_WRITE); | 1153 | nfs4_close_state(state, FMODE_WRITE); |
1150 | put_rpccred(cred); | 1154 | put_rpccred(cred); |
@@ -1449,8 +1453,10 @@ nfs4_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr, | |||
1449 | struct nfs_fattr fattr; | 1453 | struct nfs_fattr fattr; |
1450 | status = nfs4_do_setattr(NFS_SERVER(dir), &fattr, | 1454 | status = nfs4_do_setattr(NFS_SERVER(dir), &fattr, |
1451 | NFS_FH(state->inode), sattr, state); | 1455 | NFS_FH(state->inode), sattr, state); |
1452 | if (status == 0) | 1456 | if (status == 0) { |
1457 | nfs_setattr_update_inode(state->inode, sattr); | ||
1453 | goto out; | 1458 | goto out; |
1459 | } | ||
1454 | } else if (flags != 0) | 1460 | } else if (flags != 0) |
1455 | goto out; | 1461 | goto out; |
1456 | nfs4_close_state(state, flags); | 1462 | nfs4_close_state(state, flags); |
diff --git a/fs/nfs/proc.c b/fs/nfs/proc.c index cedf636bcf3c..be23c3fb9260 100644 --- a/fs/nfs/proc.c +++ b/fs/nfs/proc.c | |||
@@ -114,6 +114,8 @@ nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
114 | dprintk("NFS call setattr\n"); | 114 | dprintk("NFS call setattr\n"); |
115 | fattr->valid = 0; | 115 | fattr->valid = 0; |
116 | status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0); | 116 | status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0); |
117 | if (status == 0) | ||
118 | nfs_setattr_update_inode(inode, sattr); | ||
117 | dprintk("NFS reply setattr: %d\n", status); | 119 | dprintk("NFS reply setattr: %d\n", status); |
118 | return status; | 120 | return status; |
119 | } | 121 | } |
diff --git a/fs/nfs_common/nfsacl.c b/fs/nfs_common/nfsacl.c index 18c58c32e326..251e5a1bb1c4 100644 --- a/fs/nfs_common/nfsacl.c +++ b/fs/nfs_common/nfsacl.c | |||
@@ -239,6 +239,7 @@ nfsacl_decode(struct xdr_buf *buf, unsigned int base, unsigned int *aclcnt, | |||
239 | if (xdr_decode_word(buf, base, &entries) || | 239 | if (xdr_decode_word(buf, base, &entries) || |
240 | entries > NFS_ACL_MAX_ENTRIES) | 240 | entries > NFS_ACL_MAX_ENTRIES) |
241 | return -EINVAL; | 241 | return -EINVAL; |
242 | nfsacl_desc.desc.array_maxlen = entries; | ||
242 | err = xdr_decode_array2(buf, base + 4, &nfsacl_desc.desc); | 243 | err = xdr_decode_array2(buf, base + 4, &nfsacl_desc.desc); |
243 | if (err) | 244 | if (err) |
244 | return err; | 245 | return err; |
diff --git a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog index 9709fac6531d..21e21fe519e2 100644 --- a/fs/ntfs/ChangeLog +++ b/fs/ntfs/ChangeLog | |||
@@ -174,6 +174,9 @@ ToDo/Notes: | |||
174 | fact that the vfs and ntfs inodes are one struct in memory to find | 174 | fact that the vfs and ntfs inodes are one struct in memory to find |
175 | the ntfs inode in memory if present. Also, the ntfs inode has its | 175 | the ntfs inode in memory if present. Also, the ntfs inode has its |
176 | own locking so it does not matter if the vfs inode is locked. | 176 | own locking so it does not matter if the vfs inode is locked. |
177 | - Fix bug in mft record writing where we forgot to set the device in | ||
178 | the buffers when mapping them after the VM had discarded them | ||
179 | Thanks to Martin MOKREJŠ for the bug report. | ||
177 | 180 | ||
178 | 2.1.22 - Many bug and race fixes and error handling improvements. | 181 | 2.1.22 - Many bug and race fixes and error handling improvements. |
179 | 182 | ||
diff --git a/fs/ntfs/mft.c b/fs/ntfs/mft.c index ac9ff39aa834..317f7c679fd3 100644 --- a/fs/ntfs/mft.c +++ b/fs/ntfs/mft.c | |||
@@ -533,6 +533,7 @@ int ntfs_sync_mft_mirror(ntfs_volume *vol, const unsigned long mft_no, | |||
533 | LCN lcn; | 533 | LCN lcn; |
534 | unsigned int vcn_ofs; | 534 | unsigned int vcn_ofs; |
535 | 535 | ||
536 | bh->b_bdev = vol->sb->s_bdev; | ||
536 | /* Obtain the vcn and offset of the current block. */ | 537 | /* Obtain the vcn and offset of the current block. */ |
537 | vcn = ((VCN)mft_no << vol->mft_record_size_bits) + | 538 | vcn = ((VCN)mft_no << vol->mft_record_size_bits) + |
538 | (block_start - m_start); | 539 | (block_start - m_start); |
@@ -725,6 +726,7 @@ int write_mft_record_nolock(ntfs_inode *ni, MFT_RECORD *m, int sync) | |||
725 | LCN lcn; | 726 | LCN lcn; |
726 | unsigned int vcn_ofs; | 727 | unsigned int vcn_ofs; |
727 | 728 | ||
729 | bh->b_bdev = vol->sb->s_bdev; | ||
728 | /* Obtain the vcn and offset of the current block. */ | 730 | /* Obtain the vcn and offset of the current block. */ |
729 | vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) + | 731 | vcn = ((VCN)ni->mft_no << vol->mft_record_size_bits) + |
730 | (block_start - m_start); | 732 | (block_start - m_start); |
diff --git a/fs/reiserfs/namei.c b/fs/reiserfs/namei.c index a20bbc1642dc..3549067c42d9 100644 --- a/fs/reiserfs/namei.c +++ b/fs/reiserfs/namei.c | |||
@@ -593,6 +593,9 @@ static int new_inode_init(struct inode *inode, struct inode *dir, int mode) | |||
593 | */ | 593 | */ |
594 | inode->i_uid = current->fsuid; | 594 | inode->i_uid = current->fsuid; |
595 | inode->i_mode = mode; | 595 | inode->i_mode = mode; |
596 | /* Make inode invalid - just in case we are going to drop it before | ||
597 | * the initialization happens */ | ||
598 | INODE_PKEY(inode)->k_objectid = 0; | ||
596 | 599 | ||
597 | if (dir->i_mode & S_ISGID) { | 600 | if (dir->i_mode & S_ISGID) { |
598 | inode->i_gid = dir->i_gid; | 601 | inode->i_gid = dir->i_gid; |