aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:32:30 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-08 14:32:30 -0400
commit18062a91d2ddc40e19fc674afeb7cad58cfa23ab (patch)
tree886fe7ec99623767e38ff7fc67a078918338bb3e
parentbe3478ddb8a3902b588c840b42e166a0e64a87b3 (diff)
parent05ec9e26be1f668ccba4ca54d9a4966c6208c611 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/shaggy/jfs-2.6: JFS: Fix race waking up jfsIO kernel thread JFS: use __set_current_state() Copy i_flags to jfs inode flags on write JFS: document uid, gid, and umask mount options in jfs.txt
-rw-r--r--Documentation/filesystems/jfs.txt8
-rw-r--r--fs/jfs/inode.c1
-rw-r--r--fs/jfs/ioctl.c2
-rw-r--r--fs/jfs/jfs_imap.c2
-rw-r--r--fs/jfs/jfs_inode.c18
-rw-r--r--fs/jfs/jfs_inode.h1
-rw-r--r--fs/jfs/jfs_lock.h2
-rw-r--r--fs/jfs/jfs_logmgr.c7
-rw-r--r--fs/jfs/jfs_txnmgr.c6
9 files changed, 38 insertions, 9 deletions
diff --git a/Documentation/filesystems/jfs.txt b/Documentation/filesystems/jfs.txt
index bae128663748..26ebde77e821 100644
--- a/Documentation/filesystems/jfs.txt
+++ b/Documentation/filesystems/jfs.txt
@@ -29,7 +29,13 @@ errors=continue Keep going on a filesystem error.
29errors=remount-ro Default. Remount the filesystem read-only on an error. 29errors=remount-ro Default. Remount the filesystem read-only on an error.
30errors=panic Panic and halt the machine if an error occurs. 30errors=panic Panic and halt the machine if an error occurs.
31 31
32Please send bugs, comments, cards and letters to shaggy@austin.ibm.com. 32uid=value Override on-disk uid with specified value
33gid=value Override on-disk gid with specified value
34umask=value Override on-disk umask with specified octal value. For
35 directories, the execute bit will be set if the corresponding
36 read bit is set.
37
38Please send bugs, comments, cards and letters to shaggy@linux.vnet.ibm.com.
33 39
34The JFS mailing list can be subscribed to by using the link labeled 40The JFS mailing list can be subscribed to by using the link labeled
35"Mail list Subscribe" at our web page http://jfs.sourceforge.net/ 41"Mail list Subscribe" at our web page http://jfs.sourceforge.net/
diff --git a/fs/jfs/inode.c b/fs/jfs/inode.c
index e285022f006c..3467dde27e5a 100644
--- a/fs/jfs/inode.c
+++ b/fs/jfs/inode.c
@@ -55,7 +55,6 @@ void jfs_read_inode(struct inode *inode)
55 inode->i_op = &jfs_file_inode_operations; 55 inode->i_op = &jfs_file_inode_operations;
56 init_special_inode(inode, inode->i_mode, inode->i_rdev); 56 init_special_inode(inode, inode->i_mode, inode->i_rdev);
57 } 57 }
58 jfs_set_inode_flags(inode);
59} 58}
60 59
61/* 60/*
diff --git a/fs/jfs/ioctl.c b/fs/jfs/ioctl.c
index ed814b1ff4d9..fe063af6fd2f 100644
--- a/fs/jfs/ioctl.c
+++ b/fs/jfs/ioctl.c
@@ -59,6 +59,7 @@ int jfs_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
59 59
60 switch (cmd) { 60 switch (cmd) {
61 case JFS_IOC_GETFLAGS: 61 case JFS_IOC_GETFLAGS:
62 jfs_get_inode_flags(jfs_inode);
62 flags = jfs_inode->mode2 & JFS_FL_USER_VISIBLE; 63 flags = jfs_inode->mode2 & JFS_FL_USER_VISIBLE;
63 flags = jfs_map_ext2(flags, 0); 64 flags = jfs_map_ext2(flags, 0);
64 return put_user(flags, (int __user *) arg); 65 return put_user(flags, (int __user *) arg);
@@ -78,6 +79,7 @@ int jfs_ioctl(struct inode * inode, struct file * filp, unsigned int cmd,
78 if (!S_ISDIR(inode->i_mode)) 79 if (!S_ISDIR(inode->i_mode))
79 flags &= ~JFS_DIRSYNC_FL; 80 flags &= ~JFS_DIRSYNC_FL;
80 81
82 jfs_get_inode_flags(jfs_inode);
81 oldflags = jfs_inode->mode2; 83 oldflags = jfs_inode->mode2;
82 84
83 /* 85 /*
diff --git a/fs/jfs/jfs_imap.c b/fs/jfs/jfs_imap.c
index aa5124b643b1..c465607be991 100644
--- a/fs/jfs/jfs_imap.c
+++ b/fs/jfs/jfs_imap.c
@@ -3078,6 +3078,7 @@ static int copy_from_dinode(struct dinode * dip, struct inode *ip)
3078 3078
3079 jfs_ip->fileset = le32_to_cpu(dip->di_fileset); 3079 jfs_ip->fileset = le32_to_cpu(dip->di_fileset);
3080 jfs_ip->mode2 = le32_to_cpu(dip->di_mode); 3080 jfs_ip->mode2 = le32_to_cpu(dip->di_mode);
3081 jfs_set_inode_flags(ip);
3081 3082
3082 ip->i_mode = le32_to_cpu(dip->di_mode) & 0xffff; 3083 ip->i_mode = le32_to_cpu(dip->di_mode) & 0xffff;
3083 if (sbi->umask != -1) { 3084 if (sbi->umask != -1) {
@@ -3174,6 +3175,7 @@ static void copy_to_dinode(struct dinode * dip, struct inode *ip)
3174 dip->di_gid = cpu_to_le32(ip->i_gid); 3175 dip->di_gid = cpu_to_le32(ip->i_gid);
3175 else 3176 else
3176 dip->di_gid = cpu_to_le32(jfs_ip->saved_gid); 3177 dip->di_gid = cpu_to_le32(jfs_ip->saved_gid);
3178 jfs_get_inode_flags(jfs_ip);
3177 /* 3179 /*
3178 * mode2 is only needed for storing the higher order bits. 3180 * mode2 is only needed for storing the higher order bits.
3179 * Trust i_mode for the lower order ones 3181 * Trust i_mode for the lower order ones
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c
index 4c67ed97682b..ed6574bee51a 100644
--- a/fs/jfs/jfs_inode.c
+++ b/fs/jfs/jfs_inode.c
@@ -45,6 +45,24 @@ void jfs_set_inode_flags(struct inode *inode)
45 inode->i_flags |= S_SYNC; 45 inode->i_flags |= S_SYNC;
46} 46}
47 47
48void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)
49{
50 unsigned int flags = jfs_ip->vfs_inode.i_flags;
51
52 jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_APPEND_FL | JFS_NOATIME_FL |
53 JFS_DIRSYNC_FL | JFS_SYNC_FL);
54 if (flags & S_IMMUTABLE)
55 jfs_ip->mode2 |= JFS_IMMUTABLE_FL;
56 if (flags & S_APPEND)
57 jfs_ip->mode2 |= JFS_APPEND_FL;
58 if (flags & S_NOATIME)
59 jfs_ip->mode2 |= JFS_NOATIME_FL;
60 if (flags & S_DIRSYNC)
61 jfs_ip->mode2 |= JFS_DIRSYNC_FL;
62 if (flags & S_SYNC)
63 jfs_ip->mode2 |= JFS_SYNC_FL;
64}
65
48/* 66/*
49 * NAME: ialloc() 67 * NAME: ialloc()
50 * 68 *
diff --git a/fs/jfs/jfs_inode.h b/fs/jfs/jfs_inode.h
index 6802837f757e..2374b595f2e1 100644
--- a/fs/jfs/jfs_inode.h
+++ b/fs/jfs/jfs_inode.h
@@ -31,6 +31,7 @@ extern void jfs_truncate(struct inode *);
31extern void jfs_truncate_nolock(struct inode *, loff_t); 31extern void jfs_truncate_nolock(struct inode *, loff_t);
32extern void jfs_free_zero_link(struct inode *); 32extern void jfs_free_zero_link(struct inode *);
33extern struct dentry *jfs_get_parent(struct dentry *dentry); 33extern struct dentry *jfs_get_parent(struct dentry *dentry);
34extern void jfs_get_inode_flags(struct jfs_inode_info *);
34extern void jfs_set_inode_flags(struct inode *); 35extern void jfs_set_inode_flags(struct inode *);
35extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int); 36extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
36 37
diff --git a/fs/jfs/jfs_lock.h b/fs/jfs/jfs_lock.h
index df48ece4b7a3..ecf04882265e 100644
--- a/fs/jfs/jfs_lock.h
+++ b/fs/jfs/jfs_lock.h
@@ -45,7 +45,7 @@ do { \
45 io_schedule(); \ 45 io_schedule(); \
46 lock_cmd; \ 46 lock_cmd; \
47 } \ 47 } \
48 current->state = TASK_RUNNING; \ 48 __set_current_state(TASK_RUNNING); \
49 remove_wait_queue(&wq, &__wait); \ 49 remove_wait_queue(&wq, &__wait); \
50} while (0) 50} while (0)
51 51
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index 783e80b5a8e7..6a3f00dc8c83 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -1589,7 +1589,7 @@ void jfs_flush_journal(struct jfs_log *log, int wait)
1589 set_current_state(TASK_UNINTERRUPTIBLE); 1589 set_current_state(TASK_UNINTERRUPTIBLE);
1590 LOGGC_UNLOCK(log); 1590 LOGGC_UNLOCK(log);
1591 schedule(); 1591 schedule();
1592 current->state = TASK_RUNNING; 1592 __set_current_state(TASK_RUNNING);
1593 LOGGC_LOCK(log); 1593 LOGGC_LOCK(log);
1594 remove_wait_queue(&target->gcwait, &__wait); 1594 remove_wait_queue(&target->gcwait, &__wait);
1595 } 1595 }
@@ -2353,14 +2353,15 @@ int jfsIOWait(void *arg)
2353 lbmStartIO(bp); 2353 lbmStartIO(bp);
2354 spin_lock_irq(&log_redrive_lock); 2354 spin_lock_irq(&log_redrive_lock);
2355 } 2355 }
2356 spin_unlock_irq(&log_redrive_lock);
2357 2356
2358 if (freezing(current)) { 2357 if (freezing(current)) {
2358 spin_unlock_irq(&log_redrive_lock);
2359 refrigerator(); 2359 refrigerator();
2360 } else { 2360 } else {
2361 set_current_state(TASK_INTERRUPTIBLE); 2361 set_current_state(TASK_INTERRUPTIBLE);
2362 spin_unlock_irq(&log_redrive_lock);
2362 schedule(); 2363 schedule();
2363 current->state = TASK_RUNNING; 2364 __set_current_state(TASK_RUNNING);
2364 } 2365 }
2365 } while (!kthread_should_stop()); 2366 } while (!kthread_should_stop());
2366 2367
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index ce9ee6b4c0f6..25430d0b0d59 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -135,7 +135,7 @@ static inline void TXN_SLEEP_DROP_LOCK(wait_queue_head_t * event)
135 set_current_state(TASK_UNINTERRUPTIBLE); 135 set_current_state(TASK_UNINTERRUPTIBLE);
136 TXN_UNLOCK(); 136 TXN_UNLOCK();
137 io_schedule(); 137 io_schedule();
138 current->state = TASK_RUNNING; 138 __set_current_state(TASK_RUNNING);
139 remove_wait_queue(event, &wait); 139 remove_wait_queue(event, &wait);
140} 140}
141 141
@@ -2797,7 +2797,7 @@ int jfs_lazycommit(void *arg)
2797 set_current_state(TASK_INTERRUPTIBLE); 2797 set_current_state(TASK_INTERRUPTIBLE);
2798 LAZY_UNLOCK(flags); 2798 LAZY_UNLOCK(flags);
2799 schedule(); 2799 schedule();
2800 current->state = TASK_RUNNING; 2800 __set_current_state(TASK_RUNNING);
2801 remove_wait_queue(&jfs_commit_thread_wait, &wq); 2801 remove_wait_queue(&jfs_commit_thread_wait, &wq);
2802 } 2802 }
2803 } while (!kthread_should_stop()); 2803 } while (!kthread_should_stop());
@@ -2989,7 +2989,7 @@ int jfs_sync(void *arg)
2989 set_current_state(TASK_INTERRUPTIBLE); 2989 set_current_state(TASK_INTERRUPTIBLE);
2990 TXN_UNLOCK(); 2990 TXN_UNLOCK();
2991 schedule(); 2991 schedule();
2992 current->state = TASK_RUNNING; 2992 __set_current_state(TASK_RUNNING);
2993 } 2993 }
2994 } while (!kthread_should_stop()); 2994 } while (!kthread_should_stop());
2995 2995