Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207543
b: refs/heads/master
c: 6d8af64
h: refs/heads/master
i:
  207541: 13a5a91
  207539: 2841574
  207535: 84112ea
v: v3
  • Loading branch information
Al Viro committed Aug 9, 2010
1 parent 8bdc387 commit 2909d1c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 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: 72edc4d0873ba5165c0759264298bf5f55351c7a
refs/heads/master: 6d8af64c1c5ad4fd119b371ae70c114ee1f443b1
16 changes: 7 additions & 9 deletions trunk/ipc/mqueue.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb,
u->mq_bytes + mq_bytes >
task_rlimit(p, RLIMIT_MSGQUEUE)) {
spin_unlock(&mq_lock);
/* mqueue_delete_inode() releases info->messages */
/* mqueue_evict_inode() releases info->messages */
goto out_inode;
}
u->mq_bytes += mq_bytes;
Expand Down Expand Up @@ -241,18 +241,19 @@ static void mqueue_destroy_inode(struct inode *inode)
kmem_cache_free(mqueue_inode_cachep, MQUEUE_I(inode));
}

static void mqueue_delete_inode(struct inode *inode)
static void mqueue_evict_inode(struct inode *inode)
{
struct mqueue_inode_info *info;
struct user_struct *user;
unsigned long mq_bytes;
int i;
struct ipc_namespace *ipc_ns;

if (S_ISDIR(inode->i_mode)) {
clear_inode(inode);
end_writeback(inode);

if (S_ISDIR(inode->i_mode))
return;
}

ipc_ns = get_ns_from_inode(inode);
info = MQUEUE_I(inode);
spin_lock(&info->lock);
Expand All @@ -261,8 +262,6 @@ static void mqueue_delete_inode(struct inode *inode)
kfree(info->messages);
spin_unlock(&info->lock);

clear_inode(inode);

/* Total amount of bytes accounted for the mqueue */
mq_bytes = info->attr.mq_maxmsg * (sizeof(struct msg_msg *)
+ info->attr.mq_msgsize);
Expand Down Expand Up @@ -1225,9 +1224,8 @@ static const struct file_operations mqueue_file_operations = {
static const struct super_operations mqueue_super_ops = {
.alloc_inode = mqueue_alloc_inode,
.destroy_inode = mqueue_destroy_inode,
.evict_inode = mqueue_evict_inode,
.statfs = simple_statfs,
.delete_inode = mqueue_delete_inode,
.drop_inode = generic_delete_inode,
};

static struct file_system_type mqueue_fs_type = {
Expand Down

0 comments on commit 2909d1c

Please sign in to comment.