public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jerome de Vivie <jerome.devivie@free.fr>
To: linux-fsdevel@vger.kernel.org
Subject: changing d_parent
Date: Sun, 18 May 2003 19:42:29 +0200	[thread overview]
Message-ID: <3EC7C605.DB4BA3ED@free.fr> (raw)


I would like to change the "d_parent" field of a dentry. This is for
shrinking entry equivalent to a "./" in my filesystem namespace.

The dentry has just been allocated and has no child. I'm new to the 
dcache and i would like to know if thoses lines are is safe:

    spin_lock(&dcache_lock);
    list_del(&dentry->d_child);
    dput(dentry->d_parent);
    dentry->d_parent = dget(newparent);
    list_add(&dentry->d_child, &newparent->d_subdirs);
    spin_unlock(&dcache_lock);

kind regards,

j.

-- 
Jérôme de Vivie
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

             reply	other threads:[~2003-05-18 17:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-18 17:42 Jerome de Vivie [this message]
2003-05-19  5:55 ` changing d_parent Maneesh Soni
2003-05-19  6:07 ` Jan Hudec

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=3EC7C605.DB4BA3ED@free.fr \
    --to=jerome.devivie@free.fr \
    --cc=linux-fsdevel@vger.kernel.org \
    /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