All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de
Subject: Re: [RFC 3/7] cramfs: allow unlinking of files
Date: Sun, 1 Jun 2008 23:28:57 +0200	[thread overview]
Message-ID: <200806012328.57577.arnd@arndb.de> (raw)
In-Reply-To: <20080601165439.GD13094@logfs.org>

On Sunday 01 June 2008, Jörn Engel wrote:
> On Sat, 31 May 2008 17:20:16 +0200, arnd@arndb.de wrote:
> >  
> > +int cramfs_unlink(struct inode *dir, struct dentry *dentry)
> > +{
> > +     struct inode *inode = dentry->d_inode;
> > +     struct dentry *new;
> > +
> > +     inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> > +     drop_nlink(inode);
> > +     new = d_alloc(dentry->d_parent, &dentry->d_name);
> > +     d_add(new, NULL);
> > +
> > +     dget(dentry);
> 
> How is the negative dentry dropped on umount?  Looks like we want a
> per-sb list to put them on.  Then we can walk it and dput each one at
> umount time.

Good point. I think ramfs does exactly that, using kill_litter_super.
I haven't tested unmount so far, and should probably do something like
that in cramfs_put_super.

	Arnd <><

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: "Jörn Engel" <joern@logfs.org>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, hch@lst.de
Subject: Re: [RFC 3/7] cramfs: allow unlinking of files
Date: Sun, 1 Jun 2008 23:28:57 +0200	[thread overview]
Message-ID: <200806012328.57577.arnd@arndb.de> (raw)
In-Reply-To: <20080601165439.GD13094@logfs.org>

On Sunday 01 June 2008, Jörn Engel wrote:
> On Sat, 31 May 2008 17:20:16 +0200, arnd@arndb.de wrote:
> >  
> > +int cramfs_unlink(struct inode *dir, struct dentry *dentry)
> > +{
> > +     struct inode *inode = dentry->d_inode;
> > +     struct dentry *new;
> > +
> > +     inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME;
> > +     drop_nlink(inode);
> > +     new = d_alloc(dentry->d_parent, &dentry->d_name);
> > +     d_add(new, NULL);
> > +
> > +     dget(dentry);
> 
> How is the negative dentry dropped on umount?  Looks like we want a
> per-sb list to put them on.  Then we can walk it and dput each one at
> umount time.

Good point. I think ramfs does exactly that, using kill_litter_super.
I haven't tested unmount so far, and should probably do something like
that in cramfs_put_super.

	Arnd <><
--
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:[~2008-06-01 21:29 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080531152013.031903990@arndb.de>
2008-05-31 15:20 ` [RFC 1/7] cramfs: allow remount rw arnd
2008-05-31 15:20 ` [RFC 2/7] cramfs: create unique inode numbers arnd
2008-06-01 16:50   ` Jörn Engel
2008-06-01 16:50     ` Jörn Engel
2008-06-01 21:24     ` Arnd Bergmann
2008-06-01 21:24       ` Arnd Bergmann
2008-06-02  5:42       ` Jörn Engel
2008-06-02  5:42         ` Jörn Engel
2008-05-31 15:20 ` [RFC 3/7] cramfs: allow unlinking of files arnd
2008-06-01 16:54   ` Jörn Engel
2008-06-01 16:54     ` Jörn Engel
2008-06-01 21:28     ` Arnd Bergmann [this message]
2008-06-01 21:28       ` Arnd Bergmann
2008-05-31 15:20 ` [RFC 4/7] cramfs: allow rmdir arnd
2008-05-31 15:20 ` [RFC 5/7] cramfs: allow writing to existing files arnd
2008-05-31 15:20 ` [RFC 6/7] cramfs: read directory entries from dcache arnd
2008-05-31 15:20 ` [RFC 7/7] cramfs: add missing inode operations arnd

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=200806012328.57577.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=hch@lst.de \
    --cc=joern@logfs.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.