projects
/
unionfs-2.6.39.y.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
565947d
)
Unionfs: return EINVAL in setattr on error
author
Erez Zadok
<ezk@cs.sunysb.edu>
Wed, 17 Sep 2008 07:24:57 +0000
(
03:24
-0400)
committer
Erez Zadok
<ezk@cs.sunysb.edu>
Fri, 29 Apr 2011 02:26:33 +0000
(22:26 -0400)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/inode.c
patch
|
blob
|
history
diff --git
a/fs/unionfs/inode.c
b/fs/unionfs/inode.c
index dcf066c399c809ea4951d2ab06cde8f879c0317c..15e1e331d28d4d79458f4a435446178f1881dcec 100644
(file)
--- a/
fs/unionfs/inode.c
+++ b/
fs/unionfs/inode.c
@@
-904,7
+904,10
@@
static int unionfs_setattr(struct dentry *dentry, struct iattr *ia)
ia->ia_valid &= ~ATTR_MODE;
lower_dentry = unionfs_lower_dentry(dentry);
- BUG_ON(!lower_dentry); /* should never happen after above revalidate */
+ if (!lower_dentry) { /* should never happen after above revalidate */
+ err = -EINVAL;
+ goto out;
+ }
lower_inode = unionfs_lower_inode(inode);
/* check if user has permission to change lower inode */