diff options
author | James Morris <jmorris@namei.org> | 2011-01-09 17:46:24 -0500 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2011-01-09 17:46:24 -0500 |
commit | d2e7ad19229f982fc1eb731827d82ceac90abfb3 (patch) | |
tree | 98a3741b4d4b27a48b3c7ea9babe331e539416a8 /fs/sysfs/inode.c | |
parent | d03a5d888fb688c832d470b749acc5ed38e0bc1d (diff) | |
parent | 0c21e3aaf6ae85bee804a325aa29c325209180fd (diff) |
Merge branch 'master' into next
Conflicts:
security/smack/smack_lsm.c
Verified and added fix by Stephen Rothwell <sfr@canb.auug.org.au>
Ok'd by Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'fs/sysfs/inode.c')
-rw-r--r-- | fs/sysfs/inode.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/sysfs/inode.c b/fs/sysfs/inode.c index cffb1fd8ba33..30ac27345586 100644 --- a/fs/sysfs/inode.c +++ b/fs/sysfs/inode.c | |||
@@ -348,13 +348,18 @@ int sysfs_hash_and_remove(struct sysfs_dirent *dir_sd, const void *ns, const cha | |||
348 | return -ENOENT; | 348 | return -ENOENT; |
349 | } | 349 | } |
350 | 350 | ||
351 | int sysfs_permission(struct inode *inode, int mask) | 351 | int sysfs_permission(struct inode *inode, int mask, unsigned int flags) |
352 | { | 352 | { |
353 | struct sysfs_dirent *sd = inode->i_private; | 353 | struct sysfs_dirent *sd; |
354 | |||
355 | if (flags & IPERM_FLAG_RCU) | ||
356 | return -ECHILD; | ||
357 | |||
358 | sd = inode->i_private; | ||
354 | 359 | ||
355 | mutex_lock(&sysfs_mutex); | 360 | mutex_lock(&sysfs_mutex); |
356 | sysfs_refresh_inode(sd, inode); | 361 | sysfs_refresh_inode(sd, inode); |
357 | mutex_unlock(&sysfs_mutex); | 362 | mutex_unlock(&sysfs_mutex); |
358 | 363 | ||
359 | return generic_permission(inode, mask, NULL); | 364 | return generic_permission(inode, mask, flags, NULL); |
360 | } | 365 | } |