diff options
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/sysfs/inode.c | 4 |
5 files changed, 20 insertions, 22 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 30ab70ce5547..3497125189df 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -643,7 +643,7 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
643 | netfid, length, | 643 | netfid, length, |
644 | pfLock->fl_start, numUnlock, numLock, lockType, | 644 | pfLock->fl_start, numUnlock, numLock, lockType, |
645 | wait_flag); | 645 | wait_flag); |
646 | if (rc == 0 && (pfLock->fl_flags & FL_POSIX)) | 646 | if (pfLock->fl_flags & FL_POSIX) |
647 | posix_lock_file_wait(file, pfLock); | 647 | posix_lock_file_wait(file, pfLock); |
648 | FreeXid(xid); | 648 | FreeXid(xid); |
649 | return rc; | 649 | 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/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) |