From: Al Viro <viro@ZenIV.linux.org.uk>
To: ????????? <jaegeuk.kim@samsung.com>
Cc: "'Theodore Ts'o'" <tytso@mit.edu>,
gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
chur.lee@samsung.com, cm224.lee@samsung.com,
jooyoung.hwang@samsung.com
Subject: Re: [PATCH 11/16] f2fs: add inode operations for special inodes
Date: Sat, 6 Oct 2012 19:59:21 +0100 [thread overview]
Message-ID: <20121006185921.GI2616@ZenIV.linux.org.uk> (raw)
In-Reply-To: <001201cda2f1$633db960$29b92c20$%kim@samsung.com>
On Fri, Oct 05, 2012 at 09:03:09PM +0900, ????????? wrote:
> +static int f2fs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
> + bool excl)
> +{
> + struct super_block *sb = dir->i_sb;
> + struct f2fs_sb_info *sbi = F2FS_SB(sb);
> + struct inode *inode;
> + nid_t ino = 0;
> + int err;
> +
> + if (dentry->d_name.len > F2FS_MAX_NAME_LEN)
> + return -ENAMETOOLONG;
Pointless - failing those on ->lookup() with ENAMETOOLONG is enough.
The same goes for all entry creation methods.
> + if (inode->i_nlink >= F2FS_LINK_MAX)
> + return -EMLINK;
Just set ->s_max_links and be done with that.
> + if (dir->i_nlink >= F2FS_LINK_MAX)
> + return err;
Ditto.
> + if (old_dir_entry) {
> + err = -EMLINK;
> + if (new_dir->i_nlink >= F2FS_LINK_MAX)
> + goto out_dir;
... and here as well.
next prev parent reply other threads:[~2012-10-06 18:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-05 12:03 [PATCH 11/16] f2fs: add inode operations for special inodes 김재극
2012-10-06 18:59 ` Al Viro [this message]
2012-10-13 20:52 ` Arnd Bergmann
2012-10-13 21:57 ` Vyacheslav Dubeyko
2012-10-13 22:21 ` Vyacheslav Dubeyko
2012-10-14 7:09 ` Jaegeuk Kim
2012-10-14 12:06 ` Vyacheslav Dubeyko
2012-10-14 15:19 ` Arnd Bergmann
[not found] ` <CAN863PuYDSSFmaKtsVvdX4aFpS8hAMvFmhJpsky0x=ySn0QsqQ@mail.gmail.com>
2012-10-15 14:05 ` Arnd Bergmann
2012-10-16 2:29 ` Jaegeuk Kim
2012-10-16 16:14 ` Arnd Bergmann
2012-10-16 21:43 ` Jaegeuk Kim
2012-10-17 3:44 ` Jaegeuk Kim
2012-10-17 12:22 ` Arnd Bergmann
2012-10-17 8:35 ` Arnd Bergmann
2012-10-15 22:34 ` Dave Chinner
2012-10-16 2:00 ` Jaegeuk Kim
2012-10-16 11:38 ` Arnd Bergmann
2012-10-16 20:38 ` Jaegeuk Kim
2012-10-17 12:25 ` Arnd Bergmann
2012-10-18 5:37 ` Jaegeuk Kim
2012-10-16 20:44 ` Dave Chinner
2012-10-16 22:30 ` Jaegeuk Kim
2012-10-16 22:54 ` Dave Chinner
2012-10-17 3:25 ` Jaegeuk Kim
2012-10-17 12:50 ` Arnd Bergmann
2012-10-24 2:49 ` Dave Chinner
2012-10-24 12:02 ` Arnd Bergmann
2012-10-14 6:51 ` Jaegeuk Kim
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=20121006185921.GI2616@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=chur.lee@samsung.com \
--cc=cm224.lee@samsung.com \
--cc=gregkh@linuxfoundation.org \
--cc=jaegeuk.kim@samsung.com \
--cc=jooyoung.hwang@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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.