Commit 8d64124a authored by Al Viro's avatar Al Viro

selinux; don't open-code a loop in sb_finish_set_opts()

Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent a10d7c22
...@@ -571,10 +571,9 @@ static int sb_finish_set_opts(struct super_block *sb) ...@@ -571,10 +571,9 @@ static int sb_finish_set_opts(struct super_block *sb)
during get_sb by a pseudo filesystem that directly during get_sb by a pseudo filesystem that directly
populates itself. */ populates itself. */
spin_lock(&sbsec->isec_lock); spin_lock(&sbsec->isec_lock);
next_inode: while (!list_empty(&sbsec->isec_head)) {
if (!list_empty(&sbsec->isec_head)) {
struct inode_security_struct *isec = struct inode_security_struct *isec =
list_entry(sbsec->isec_head.next, list_first_entry(&sbsec->isec_head,
struct inode_security_struct, list); struct inode_security_struct, list);
struct inode *inode = isec->inode; struct inode *inode = isec->inode;
list_del_init(&isec->list); list_del_init(&isec->list);
...@@ -586,7 +585,6 @@ static int sb_finish_set_opts(struct super_block *sb) ...@@ -586,7 +585,6 @@ static int sb_finish_set_opts(struct super_block *sb)
iput(inode); iput(inode);
} }
spin_lock(&sbsec->isec_lock); spin_lock(&sbsec->isec_lock);
goto next_inode;
} }
spin_unlock(&sbsec->isec_lock); spin_unlock(&sbsec->isec_lock);
out: out:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment