From: Artem Bityutskiy <dedekind@infradead.org>
To: Cal Page <pagcal@runbox.com>
Cc: ubifs <linux-mtd@lists.infradead.org>
Subject: Re: ubifs: another scheduling while atomic back trace
Date: Thu, 18 Dec 2008 15:53:38 +0200 [thread overview]
Message-ID: <1229608418.30575.4.camel@sauron> (raw)
In-Reply-To: <494A517E.2000405@runbox.com>
On Thu, 2008-12-18 at 08:34 -0500, Cal Page wrote:
> I tracked it down to fs/ubifs/journal.c in make_reservation()?
How did you track? And what pointed you to this function?
> the code is:
> again:
> down_read()
> err = reserve_space()
> if ( !err) return 0
> up_read()
That code really looks hacky, because it takes the lock and assumes the
caller unlocks it. We tried to come up with a better solution, and
debated on this, but concluded that this is the best way.
IOW, this is fine, because the caller unlocks the lock using
'finish_reservation()' call.
Moreover, rw semaphore should not make the code to be atomic.
> Also, I notice fs/fs-writeback.c in writeback_inodes does a
> down_read_trylock. Won't this interfear with the down_read above?
Sorry, I do not see how and what should interfere there.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
next prev parent reply other threads:[~2008-12-18 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-18 13:34 ubifs: another scheduling while atomic back trace Cal Page
2008-12-18 13:53 ` Artem Bityutskiy [this message]
-- strict thread matches above, loose matches on Subject: below --
2008-12-17 17:10 Cal Page
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1229608418.30575.4.camel@sauron \
--to=dedekind@infradead.org \
--cc=linux-mtd@lists.infradead.org \
--cc=pagcal@runbox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox