Skip to content

Commit 0003230

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: fs: take the ACL checks to common code bury posix_acl_..._masq() variants kill boilerplates around posix_acl_create_masq() generic_acl: no need to clone acl just to push it to set_cached_acl() kill boilerplate around posix_acl_chmod_masq() reiserfs: cache negative ACLs for v1 stat format xfs: cache negative ACLs if there is no attribute fork 9p: do no return 0 from ->check_acl without actually checking vfs: move ACL cache lookup into generic code CIFS: Fix oops while mounting with prefixpath xfs: Fix wrong return value of xfs_file_aio_write fix devtmpfs race caam: don't pass bogus S_IFCHR to debugfs_create_...() get rid of create_proc_entry() abuses - proc_mkdir() is there for purpose asus-wmi: ->is_visible() can't return negative fix jffs2 ACLs on big-endian with 16bit mode_t 9p: close ACL leaks ocfs2_init_acl(): fix a leak VFS : mount lock scalability for internal mounts
2 parents 4b478ce + 4e34e71 commit 0003230

76 files changed

Lines changed: 477 additions & 795 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Documentation/filesystems/Locking‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ ata *);
5252
void (*put_link) (struct dentry *, struct nameidata *, void *);
5353
void (*truncate) (struct inode *);
5454
int (*permission) (struct inode *, int, unsigned int);
55-
int (*check_acl)(struct inode *, int);
55+
int (*get_acl)(struct inode *, int);
5656
int (*setattr) (struct dentry *, struct iattr *);
5757
int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
5858
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -80,7 +80,7 @@ put_link: no
8080
truncate: yes (see below)
8181
setattr: yes
8282
permission: no (may not block if called in rcu-walk mode)
83-
check_acl: no
83+
get_acl: no
8484
getattr: no
8585
setxattr: yes
8686
getxattr: no

‎Documentation/filesystems/porting‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -407,10 +407,11 @@ to some pointer to returning that pointer. On errors return ERR_PTR(...).
407407

408408
--
409409
[mandatory]
410-
->permission(), generic_permission() and ->check_acl() have lost flags
410+
->permission() and generic_permission()have lost flags
411411
argument; instead of passing IPERM_FLAG_RCU we add MAY_NOT_BLOCK into mask.
412-
generic_permission() has also lost the check_acl argument; if you want
413-
non-NULL to be used for that inode, put it into ->i_op->check_acl.
412+
generic_permission() has also lost the check_acl argument; ACL checking
413+
has been taken to VFS and filesystems need to provide a non-NULL ->i_op->get_acl
414+
to read an ACL from disk.
414415

415416
--
416417
[mandatory]

‎Documentation/filesystems/vfs.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ struct inode_operations {
356356
void (*put_link) (struct dentry *, struct nameidata *, void *);
357357
void (*truncate) (struct inode *);
358358
int (*permission) (struct inode *, int);
359-
int (*check_acl)(struct inode *, int);
359+
int (*get_acl)(struct inode *, int);
360360
int (*setattr) (struct dentry *, struct iattr *);
361361
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
362362
int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);

‎arch/arm/mach-bcmring/dma.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ int dma_init(void)
835835

836836
/* Create /proc/dma/channels and /proc/dma/devices */
837837

838-
gDmaDir = create_proc_entry("dma", S_IFDIR | S_IRUGO | S_IXUGO, NULL);
838+
gDmaDir = proc_mkdir("dma", NULL);
839839

840840
if (gDmaDir == NULL) {
841841
printk(KERN_ERR "Unable to create /proc/dma\n");

‎drivers/base/devtmpfs.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,9 +406,10 @@ static int devtmpfsd(void *p)
406406
requests = NULL;
407407
spin_unlock(&req_lock);
408408
while (req) {
409+
struct req *next = req->next;
409410
req->err = handle(req->name, req->mode, req->dev);
410411
complete(&req->done);
411-
req = req->next;
412+
req = next;
412413
}
413414
spin_lock(&req_lock);
414415
}

‎drivers/crypto/caam/ctrl.c‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -166,68 +166,68 @@ static int caam_probe(struct platform_device *pdev)
166166
/* Controller-level - performance monitor counters */
167167
ctrlpriv->ctl_rq_dequeued =
168168
debugfs_create_u64("rq_dequeued",
169-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
169+
S_IRUSR | S_IRGRP | S_IROTH,
170170
ctrlpriv->ctl, &perfmon->req_dequeued);
171171
ctrlpriv->ctl_ob_enc_req =
172172
debugfs_create_u64("ob_rq_encrypted",
173-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
173+
S_IRUSR | S_IRGRP | S_IROTH,
174174
ctrlpriv->ctl, &perfmon->ob_enc_req);
175175
ctrlpriv->ctl_ib_dec_req =
176176
debugfs_create_u64("ib_rq_decrypted",
177-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
177+
S_IRUSR | S_IRGRP | S_IROTH,
178178
ctrlpriv->ctl, &perfmon->ib_dec_req);
179179
ctrlpriv->ctl_ob_enc_bytes =
180180
debugfs_create_u64("ob_bytes_encrypted",
181-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
181+
S_IRUSR | S_IRGRP | S_IROTH,
182182
ctrlpriv->ctl, &perfmon->ob_enc_bytes);
183183
ctrlpriv->ctl_ob_prot_bytes =
184184
debugfs_create_u64("ob_bytes_protected",
185-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
185+
S_IRUSR | S_IRGRP | S_IROTH,
186186
ctrlpriv->ctl, &perfmon->ob_prot_bytes);
187187
ctrlpriv->ctl_ib_dec_bytes =
188188
debugfs_create_u64("ib_bytes_decrypted",
189-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
189+
S_IRUSR | S_IRGRP | S_IROTH,
190190
ctrlpriv->ctl, &perfmon->ib_dec_bytes);
191191
ctrlpriv->ctl_ib_valid_bytes =
192192
debugfs_create_u64("ib_bytes_validated",
193-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
193+
S_IRUSR | S_IRGRP | S_IROTH,
194194
ctrlpriv->ctl, &perfmon->ib_valid_bytes);
195195

196196
/* Controller level - global status values */
197197
ctrlpriv->ctl_faultaddr =
198198
debugfs_create_u64("fault_addr",
199-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
199+
S_IRUSR | S_IRGRP | S_IROTH,
200200
ctrlpriv->ctl, &perfmon->faultaddr);
201201
ctrlpriv->ctl_faultdetail =
202202
debugfs_create_u32("fault_detail",
203-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
203+
S_IRUSR | S_IRGRP | S_IROTH,
204204
ctrlpriv->ctl, &perfmon->faultdetail);
205205
ctrlpriv->ctl_faultstatus =
206206
debugfs_create_u32("fault_status",
207-
S_IFCHR | S_IRUSR | S_IRGRP | S_IROTH,
207+
S_IRUSR | S_IRGRP | S_IROTH,
208208
ctrlpriv->ctl, &perfmon->status);
209209

210210
/* Internal covering keys (useful in non-secure mode only) */
211211
ctrlpriv->ctl_kek_wrap.data = &ctrlpriv->ctrl->kek[0];
212212
ctrlpriv->ctl_kek_wrap.size = KEK_KEY_SIZE * sizeof(u32);
213213
ctrlpriv->ctl_kek = debugfs_create_blob("kek",
214-
S_IFCHR | S_IRUSR |
214+
S_IRUSR |
215215
S_IRGRP | S_IROTH,
216216
ctrlpriv->ctl,
217217
&ctrlpriv->ctl_kek_wrap);
218218

219219
ctrlpriv->ctl_tkek_wrap.data = &ctrlpriv->ctrl->tkek[0];
220220
ctrlpriv->ctl_tkek_wrap.size = KEK_KEY_SIZE * sizeof(u32);
221221
ctrlpriv->ctl_tkek = debugfs_create_blob("tkek",
222-
S_IFCHR | S_IRUSR |
222+
S_IRUSR |
223223
S_IRGRP | S_IROTH,
224224
ctrlpriv->ctl,
225225
&ctrlpriv->ctl_tkek_wrap);
226226

227227
ctrlpriv->ctl_tdsk_wrap.data = &ctrlpriv->ctrl->tdsk[0];
228228
ctrlpriv->ctl_tdsk_wrap.size = KEK_KEY_SIZE * sizeof(u32);
229229
ctrlpriv->ctl_tdsk = debugfs_create_blob("tdsk",
230-
S_IFCHR | S_IRUSR |
230+
S_IRUSR |
231231
S_IRGRP | S_IROTH,
232232
ctrlpriv->ctl,
233233
&ctrlpriv->ctl_tdsk_wrap);

‎drivers/mtd/mtdchar.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1192,7 +1192,7 @@ static int __init init_mtdchar(void)
11921192
static void __exit cleanup_mtdchar(void)
11931193
{
11941194
unregister_mtd_user(&mtdchar_notifier);
1195-
mntput(mtd_inode_mnt);
1195+
kern_unmount(mtd_inode_mnt);
11961196
unregister_filesystem(&mtd_inodefs_type);
11971197
__unregister_chrdev(MTD_CHAR_MAJOR, 0, 1 << MINORBITS, "mtd");
11981198
}

‎drivers/platform/x86/asus-wmi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,7 @@ static mode_t asus_hwmon_sysfs_is_visible(struct kobject *kobj,
857857
int err = asus_wmi_get_devstate(asus, dev_id, &value);
858858

859859
if (err < 0)
860-
return err;
860+
return 0; /* can't return negative here */
861861
}
862862

863863
if (dev_id == ASUS_WMI_DEVID_FAN_CTRL) {

‎drivers/staging/rtl8187se/r8180_core.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ static int proc_get_stats_tx(char *page, char **start,
307307
void rtl8180_proc_module_init(void)
308308
{
309309
DMESG("Initializing proc filesystem");
310-
rtl8180_proc = create_proc_entry(RTL8180_MODULE_NAME, S_IFDIR, init_net.proc_net);
310+
rtl8180_proc = proc_mkdir(RTL8180_MODULE_NAME, init_net.proc_net);
311311
}
312312

313313
void rtl8180_proc_module_remove(void)

‎drivers/staging/rtl8192e/ieee80211/ieee80211_module.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ int __init ieee80211_rtl_init(void)
311311
}
312312

313313
ieee80211_debug_level = debug;
314-
ieee80211_proc = create_proc_entry(DRV_NAME, S_IFDIR, init_net.proc_net);
314+
ieee80211_proc = proc_mkdir(DRV_NAME, init_net.proc_net);
315315
if (ieee80211_proc == NULL) {
316316
IEEE80211_ERROR("Unable to create " DRV_NAME
317317
" proc directory\n");

0 commit comments

Comments
 (0)