Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188921
b: refs/heads/master
c: 6cb4aff
h: refs/heads/master
i:
  188919: f759ddd
v: v3
  • Loading branch information
Jeff Mahoney authored and Linus Torvalds committed Mar 24, 2010
1 parent 6890b3e commit e03df9b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 298359c5bf06c04258d7cf552426e198c47e83c1
refs/heads/master: 6cb4aff0a77cc0e6bae9475d62205319e3ebbf3f
2 changes: 1 addition & 1 deletion trunk/fs/reiserfs/xattr_security.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int reiserfs_security_init(struct inode *dir, struct inode *inode,
return error;
}

if (sec->length) {
if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) {
blocks = reiserfs_xattr_jcreate_nblocks(inode) +
reiserfs_xattr_nblocks(inode, sec->length);
/* We don't want to count the directories twice if we have
Expand Down
5 changes: 5 additions & 0 deletions trunk/include/linux/reiserfs_xattr.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ int reiserfs_security_write(struct reiserfs_transaction_handle *th,
void reiserfs_security_free(struct reiserfs_security_handle *sec);
#endif

static inline int reiserfs_xattrs_initialized(struct super_block *sb)
{
return REISERFS_SB(sb)->priv_root != NULL;
}

#define xattr_size(size) ((size) + sizeof(struct reiserfs_xattr_header))
static inline loff_t reiserfs_xattr_nblocks(struct inode *inode, loff_t size)
{
Expand Down

0 comments on commit e03df9b

Please sign in to comment.