diff options
author | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:33:26 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2005-08-30 14:33:26 -0400 |
commit | 2016ef789a9ded2e169ad1c028ae3deb5302571f (patch) | |
tree | 601359f15b42d4d9868b4eadfe909a7bef6435c5 /fs | |
parent | 7f57356b70dda014ef269135942426e4a852023e (diff) | |
parent | 6b39374a27eb4be7e9d82145ae270ba02ea90dc8 (diff) |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'fs')
-rw-r--r-- | fs/adfs/adfs.h | 4 | ||||
-rw-r--r-- | fs/cifs/file.c | 2 | ||||
-rw-r--r-- | fs/hppfs/hppfs_kern.c | 30 | ||||
-rw-r--r-- | fs/inotify.c | 2 | ||||
-rw-r--r-- | fs/jfs/namei.c | 5 | ||||
-rw-r--r-- | fs/smbfs/sock.c | 2 | ||||
-rw-r--r-- | fs/sysfs/inode.c | 4 |
7 files changed, 23 insertions, 26 deletions
diff --git a/fs/adfs/adfs.h b/fs/adfs/adfs.h index 63f5df9afb71..fd528433de43 100644 --- a/fs/adfs/adfs.h +++ b/fs/adfs/adfs.h | |||
@@ -97,7 +97,7 @@ extern int adfs_dir_update(struct super_block *sb, struct object_info *obj); | |||
97 | extern struct inode_operations adfs_file_inode_operations; | 97 | extern struct inode_operations adfs_file_inode_operations; |
98 | extern struct file_operations adfs_file_operations; | 98 | extern struct file_operations adfs_file_operations; |
99 | 99 | ||
100 | extern inline __u32 signed_asl(__u32 val, signed int shift) | 100 | static inline __u32 signed_asl(__u32 val, signed int shift) |
101 | { | 101 | { |
102 | if (shift >= 0) | 102 | if (shift >= 0) |
103 | val <<= shift; | 103 | val <<= shift; |
@@ -112,7 +112,7 @@ extern inline __u32 signed_asl(__u32 val, signed int shift) | |||
112 | * | 112 | * |
113 | * The root directory ID should always be looked up in the map [3.4] | 113 | * The root directory ID should always be looked up in the map [3.4] |
114 | */ | 114 | */ |
115 | extern inline int | 115 | static inline int |
116 | __adfs_block_map(struct super_block *sb, unsigned int object_id, | 116 | __adfs_block_map(struct super_block *sb, unsigned int object_id, |
117 | unsigned int block) | 117 | unsigned int block) |
118 | { | 118 | { |
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 026b5c5ccc89..ef455dda0473 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -650,7 +650,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
650 | netfid, length, | 650 | netfid, length, |
651 | pfLock->fl_start, numUnlock, numLock, lockType, | 651 | pfLock->fl_start, numUnlock, numLock, lockType, |
652 | wait_flag); | 652 | wait_flag); |
653 | if (rc == 0 && (pfLock->fl_flags & FL_POSIX)) | 653 | if (pfLock->fl_flags & FL_POSIX) |
654 | posix_lock_file_wait(file, pfLock); | 654 | posix_lock_file_wait(file, pfLock); |
655 | FreeXid(xid); | 655 | FreeXid(xid); |
656 | return rc; | 656 | return rc; |
diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c index ff150fedb981..52930915bad8 100644 --- a/fs/hppfs/hppfs_kern.c +++ b/fs/hppfs/hppfs_kern.c | |||
@@ -38,7 +38,7 @@ struct hppfs_inode_info { | |||
38 | 38 | ||
39 | static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) | 39 | static inline struct hppfs_inode_info *HPPFS_I(struct inode *inode) |
40 | { | 40 | { |
41 | return(list_entry(inode, struct hppfs_inode_info, vfs_inode)); | 41 | return container_of(inode, struct hppfs_inode_info, vfs_inode); |
42 | } | 42 | } |
43 | 43 | ||
44 | #define HPPFS_SUPER_MAGIC 0xb00000ee | 44 | #define HPPFS_SUPER_MAGIC 0xb00000ee |
@@ -662,42 +662,36 @@ static int hppfs_readlink(struct dentry *dentry, char *buffer, int buflen) | |||
662 | { | 662 | { |
663 | struct file *proc_file; | 663 | struct file *proc_file; |
664 | struct dentry *proc_dentry; | 664 | struct dentry *proc_dentry; |
665 | int (*readlink)(struct dentry *, char *, int); | 665 | int ret; |
666 | int err, n; | ||
667 | 666 | ||
668 | proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; | 667 | proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; |
669 | proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); | 668 | proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); |
670 | err = PTR_ERR(proc_dentry); | 669 | if (IS_ERR(proc_file)) |
671 | if(IS_ERR(proc_dentry)) | 670 | return PTR_ERR(proc_file); |
672 | return(err); | ||
673 | 671 | ||
674 | readlink = proc_dentry->d_inode->i_op->readlink; | 672 | ret = proc_dentry->d_inode->i_op->readlink(proc_dentry, buffer, buflen); |
675 | n = (*readlink)(proc_dentry, buffer, buflen); | ||
676 | 673 | ||
677 | fput(proc_file); | 674 | fput(proc_file); |
678 | 675 | ||
679 | return(n); | 676 | return ret; |
680 | } | 677 | } |
681 | 678 | ||
682 | static int hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 679 | static void* hppfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
683 | { | 680 | { |
684 | struct file *proc_file; | 681 | struct file *proc_file; |
685 | struct dentry *proc_dentry; | 682 | struct dentry *proc_dentry; |
686 | int (*follow_link)(struct dentry *, struct nameidata *); | 683 | void *ret; |
687 | int err, n; | ||
688 | 684 | ||
689 | proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; | 685 | proc_dentry = HPPFS_I(dentry->d_inode)->proc_dentry; |
690 | proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); | 686 | proc_file = dentry_open(dget(proc_dentry), NULL, O_RDONLY); |
691 | err = PTR_ERR(proc_dentry); | 687 | if (IS_ERR(proc_file)) |
692 | if(IS_ERR(proc_dentry)) | 688 | return proc_file; |
693 | return(err); | ||
694 | 689 | ||
695 | follow_link = proc_dentry->d_inode->i_op->follow_link; | 690 | ret = proc_dentry->d_inode->i_op->follow_link(proc_dentry, nd); |
696 | n = (*follow_link)(proc_dentry, nd); | ||
697 | 691 | ||
698 | fput(proc_file); | 692 | fput(proc_file); |
699 | 693 | ||
700 | return(n); | 694 | return ret; |
701 | } | 695 | } |
702 | 696 | ||
703 | static struct inode_operations hppfs_dir_iops = { | 697 | static struct inode_operations hppfs_dir_iops = { |
diff --git a/fs/inotify.c b/fs/inotify.c index 868901b1e779..2e4e2a57708c 100644 --- a/fs/inotify.c +++ b/fs/inotify.c | |||
@@ -353,7 +353,7 @@ static int inotify_dev_get_wd(struct inotify_device *dev, | |||
353 | do { | 353 | do { |
354 | if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL))) | 354 | if (unlikely(!idr_pre_get(&dev->idr, GFP_KERNEL))) |
355 | return -ENOSPC; | 355 | return -ENOSPC; |
356 | ret = idr_get_new_above(&dev->idr, watch, dev->last_wd, &watch->wd); | 356 | ret = idr_get_new_above(&dev->idr, watch, dev->last_wd+1, &watch->wd); |
357 | } while (ret == -EAGAIN); | 357 | } while (ret == -EAGAIN); |
358 | 358 | ||
359 | return ret; | 359 | return ret; |
diff --git a/fs/jfs/namei.c b/fs/jfs/namei.c index 1cae14e741eb..49ccde3937f9 100644 --- a/fs/jfs/namei.c +++ b/fs/jfs/namei.c | |||
@@ -1390,6 +1390,8 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc | |||
1390 | 1390 | ||
1391 | jfs_info("jfs_lookup: name = %s", name); | 1391 | jfs_info("jfs_lookup: name = %s", name); |
1392 | 1392 | ||
1393 | if (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2) | ||
1394 | dentry->d_op = &jfs_ci_dentry_operations; | ||
1393 | 1395 | ||
1394 | if ((name[0] == '.') && (len == 1)) | 1396 | if ((name[0] == '.') && (len == 1)) |
1395 | inum = dip->i_ino; | 1397 | inum = dip->i_ino; |
@@ -1417,9 +1419,6 @@ static struct dentry *jfs_lookup(struct inode *dip, struct dentry *dentry, struc | |||
1417 | return ERR_PTR(-EACCES); | 1419 | return ERR_PTR(-EACCES); |
1418 | } | 1420 | } |
1419 | 1421 | ||
1420 | if (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2) | ||
1421 | dentry->d_op = &jfs_ci_dentry_operations; | ||
1422 | |||
1423 | dentry = d_splice_alias(ip, dentry); | 1422 | dentry = d_splice_alias(ip, dentry); |
1424 | 1423 | ||
1425 | if (dentry && (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2)) | 1424 | if (dentry && (JFS_SBI(dip->i_sb)->mntflag & JFS_OS2)) |
diff --git a/fs/smbfs/sock.c b/fs/smbfs/sock.c index 93f3cd22a2e9..6815b1b12b68 100644 --- a/fs/smbfs/sock.c +++ b/fs/smbfs/sock.c | |||
@@ -15,12 +15,12 @@ | |||
15 | #include <linux/file.h> | 15 | #include <linux/file.h> |
16 | #include <linux/in.h> | 16 | #include <linux/in.h> |
17 | #include <linux/net.h> | 17 | #include <linux/net.h> |
18 | #include <linux/tcp.h> | ||
19 | #include <linux/mm.h> | 18 | #include <linux/mm.h> |
20 | #include <linux/netdevice.h> | 19 | #include <linux/netdevice.h> |
21 | #include <linux/smp_lock.h> | 20 | #include <linux/smp_lock.h> |
22 | #include <linux/workqueue.h> | 21 | #include <linux/workqueue.h> |
23 | #include <net/scm.h> | 22 | #include <net/scm.h> |
23 | #include <net/tcp_states.h> | ||
24 | #include <net/ip.h> | 24 | #include <net/ip.h> |
25 | 25 | ||
26 | #include <linux/smb_fs.h> | 26 | #include <linux/smb_fs.h> |
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index d727dc960634..970a33f03299 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -228,6 +228,10 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) | |||
228 | struct sysfs_dirent * sd; | 228 | struct sysfs_dirent * sd; |
229 | struct sysfs_dirent * parent_sd = dir->d_fsdata; | 229 | struct sysfs_dirent * parent_sd = dir->d_fsdata; |
230 | 230 | ||
231 | if (dir->d_inode == NULL) | ||
232 | /* no inode means this hasn't been made visible yet */ | ||
233 | return; | ||
234 | |||
231 | down(&dir->d_inode->i_sem); | 235 | down(&dir->d_inode->i_sem); |
232 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { | 236 | list_for_each_entry(sd, &parent_sd->s_children, s_sibling) { |
233 | if (!sd->s_element) | 237 | if (!sd->s_element) |